diff options
Diffstat (limited to 'src/test/ui/regions/regions-adjusted-lvalue-op.rs')
-rw-r--r-- | src/test/ui/regions/regions-adjusted-lvalue-op.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/test/ui/regions/regions-adjusted-lvalue-op.rs b/src/test/ui/regions/regions-adjusted-lvalue-op.rs deleted file mode 100644 index 5aa5a3ecb..000000000 --- a/src/test/ui/regions/regions-adjusted-lvalue-op.rs +++ /dev/null @@ -1,16 +0,0 @@ -// check that we link regions in mutable place ops correctly - issue #41774 - -struct Data(i32); - -trait OhNo { - fn oh_no(&mut self, other: &Vec<Data>) { loop {} } -} - -impl OhNo for Data {} -impl OhNo for [Data] {} - -fn main() { - let mut v = vec![Data(0)]; - v[0].oh_no(&v); //~ ERROR cannot borrow `v` as immutable because - (*v).oh_no(&v); //~ ERROR cannot borrow `v` as immutable because -} |