summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/assign-non-lval-derefmut.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/typeck/assign-non-lval-derefmut.fixed')
-rw-r--r--src/test/ui/typeck/assign-non-lval-derefmut.fixed15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/test/ui/typeck/assign-non-lval-derefmut.fixed b/src/test/ui/typeck/assign-non-lval-derefmut.fixed
deleted file mode 100644
index 0c23199af..000000000
--- a/src/test/ui/typeck/assign-non-lval-derefmut.fixed
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-rustfix
-
-fn main() {
- let x = std::sync::Mutex::new(1usize);
- *x.lock().unwrap() = 2;
- //~^ ERROR invalid left-hand side of assignment
- *x.lock().unwrap() += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `MutexGuard<'_, usize>`
-
- let mut y = x.lock().unwrap();
- *y = 2;
- //~^ ERROR mismatched types
- *y += 1;
- //~^ ERROR binary assignment operation `+=` cannot be applied to type `MutexGuard<'_, usize>`
-}