diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-11-05 16:37:18 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-11-05 16:37:18 +0100 |
| commit | fff9ddedcef8a869a4665414bf4f5a122eeab823 (patch) | |
| tree | 163c3b3873595d471b25b169c1ccd2dcc411b314 | |
| parent | b75fbbf54095d5430ddf0f93c7210fe6f9007bc6 (diff) | |
| download | rust-fff9ddedcef8a869a4665414bf4f5a122eeab823.tar.gz rust-fff9ddedcef8a869a4665414bf4f5a122eeab823.zip | |
For feature-gate-nll test, turn off testing modes that externally enable NLL.
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-nll.nll.stderr | 13 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-nll.rs | 22 |
2 files changed, 11 insertions, 24 deletions
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 81de0d14aa7..00000000000 --- 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 752b1fa821f..14c48fb48a0 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 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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; |
