]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs
Auto merge of #57101 - o01eg:fix-57014, r=alexcrichton
[rust.git] / src / test / ui / borrowck / borrowck-move-out-of-overloaded-auto-deref.rs
1 // revisions: ast mir
2 //[mir]compile-flags: -Z borrowck=mir
3
4 use std::rc::Rc;
5
6 pub fn main() {
7     let _x = Rc::new(vec![1, 2]).into_iter();
8     //[ast]~^ ERROR cannot move out of borrowed content [E0507]
9     //[mir]~^^ ERROR [E0507]
10 }