blob: 8ec752409ab00483c89e3dbaee6b3a94bf7eff27 [file] [log] [blame]
// There isn't a great way to test feature(nll), since it just disables migrate
// mode and changes some error messages. We just test for migrate mode.
// Don't use compare-mode=nll, since that turns on NLL.
// ignore-compare-mode-nll
// ignore-compare-mode-polonius
#![feature(rustc_attrs)]
#[rustc_error]
fn main() { //~ ERROR compilation successful
let mut x = (33, &0);
let m = &mut x;
let p = &*x.1;
//~^ WARNING cannot borrow
//~| WARNING this error has been downgraded to a warning
//~| WARNING this warning will become a hard error in the future
m;
}