diff --git a/src/test/ui/feature-gates/feature-gate-nll.nll.stderr b/src/test/ui/feature-gates/feature-gate-nll.nll.stderr deleted file mode 100644 index 81de0d14aa7d3..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-nll.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: compilation successful - --> $DIR/feature-gate-nll.rs:13:1 - | -LL | / fn main() { #![rustc_error] // rust-lang/rust#49855 -LL | | let mut x = 33; -LL | | -LL | | let p = &x; -LL | | x = 22; //~ ERROR cannot assign to `x` because it is borrowed [E0506] -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/feature-gates/feature-gate-nll.rs b/src/test/ui/feature-gates/feature-gate-nll.rs index 752b1fa821f7f..14c48fb48a09b 100644 --- a/src/test/ui/feature-gates/feature-gate-nll.rs +++ b/src/test/ui/feature-gates/feature-gate-nll.rs @@ -1,16 +1,16 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. -#![feature(rustc_attrs)] +// This is a test checking that if you do not opt into NLL then you +// should not get the effects of NLL applied to the test. + +// Don't use 2018 edition, since that turns on NLL (migration mode). +// edition:2015 + +// Don't use compare-mode=nll, since that turns on NLL. +// ignore-compare-mode-nll + + #![allow(dead_code)] -fn main() { #![rustc_error] // rust-lang/rust#49855 +fn main() { let mut x = 33; let p = &x;