]> git.proxmox.com Git - rustc.git/blob - src/test/ui/feature-gates/feature-gate-nll.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / feature-gates / feature-gate-nll.rs
1 // There isn't a great way to test feature(nll), since it just disables migrate
2 // mode and changes some error messages.
3
4 // FIXME(Centril): This test is probably obsolete now and `nll` should become
5 // `accepted`.
6
7 // Don't use compare-mode=nll, since that turns on NLL.
8 // ignore-compare-mode-nll
9 // ignore-compare-mode-polonius
10
11 fn main() {
12 let mut x = (33, &0);
13
14 let m = &mut x;
15 let p = &*x.1;
16 //~^ ERROR cannot borrow
17 m;
18 }