]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-nll.rs
Rollup merge of #94263 - anko:patch-1, r=GuillaumeGomez
[rust.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 }