rust/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs
2018-12-25 21:08:33 -07:00

11 lines
236 B
Rust

// revisions: ast mir
//[mir]compile-flags: -Z borrowck=mir
use std::rc::Rc;
pub fn main() {
let _x = Rc::new(vec![1, 2]).into_iter();
//[ast]~^ ERROR cannot move out of borrowed content [E0507]
//[mir]~^^ ERROR [E0507]
}