diff options
Diffstat (limited to 'src/test/ui/borrowck/issue-82462.rs')
-rw-r--r-- | src/test/ui/borrowck/issue-82462.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/test/ui/borrowck/issue-82462.rs b/src/test/ui/borrowck/issue-82462.rs deleted file mode 100644 index 5a3c64255..000000000 --- a/src/test/ui/borrowck/issue-82462.rs +++ /dev/null @@ -1,21 +0,0 @@ -struct DroppingSlice<'a>(&'a [i32]); - -impl Drop for DroppingSlice<'_> { - fn drop(&mut self) { - println!("hi from slice"); - } -} - -impl DroppingSlice<'_> { - fn iter(&self) -> std::slice::Iter<'_, i32> { - self.0.iter() - } -} - -fn main() { - let mut v = vec![1, 2, 3, 4]; - for x in DroppingSlice(&*v).iter() { - v.push(*x); //~ERROR - break; - } -} |