Skip to content

Commit be5fe05

Browse files
committed
Remove feature(nll) when compare mode is sufficient
1 parent ff71b80 commit be5fe05

File tree

301 files changed

+761
-1016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+761
-1016
lines changed

src/test/codegen/enum-debug-niche-2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "Error",{{.*}}extraData: i64 0{{[,)].*}}
1414

1515
#![feature(never_type)]
16-
#![feature(nll)]
1716

1817
#[derive(Copy, Clone)]
1918
pub struct Entity {

src/test/mir-opt/remove_fake_borrows.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
// ignore-wasm32-bare
44

5-
#![feature(nll)]
6-
75
fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
86
match x {
97
Some(0) if c => 0,

src/test/run-fail/issue-51345.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// error-pattern: thread 'main' panicked at 'explicit panic'
22

3-
#![feature(nll)]
4-
53
fn main() {
64
let mut vec = vec![];
75
vec.push((vec.len(), panic!()));

src/test/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#![allow(unused_variables)]
44
// Test case from #39963.
55

6-
#![feature(nll)]
7-
86
#[derive(Clone)]
97
struct Foo(Option<Box<Foo>>, Option<Box<Foo>>);
108

src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// run-pass
2-
#![feature(nll)]
32
#![deny(unused_mut)]
43

54
#[derive(Debug)]

src/test/run-pass/borrowck/two-phase-bin-ops.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
// run-pass
2-
// revisions: lxl nll
3-
4-
#![cfg_attr(nll, feature(nll))]
5-
62
use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
73
use std::ops::{BitAndAssign, BitOrAssign, BitXorAssign, ShlAssign, ShrAssign};
84

src/test/run-pass/issues/issue-24535-allow-mutable-borrow-in-match-guard.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// See further discussion on rust-lang/rust#24535,
66
// rust-lang/rfcs#1006, and rust-lang/rfcs#107
77

8-
#![feature(nll)]
98
#![feature(bind_by_move_pattern_guards)]
109

1110
fn main() {

src/test/run-pass/issues/issue-48962.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// run-pass
22
#![allow(unused_must_use)]
33
// Test that we are able to reinitialize box with moved referent
4-
#![feature(nll)]
54
static mut ORDER: [usize; 3] = [0, 0, 0];
65
static mut INDEX: usize = 0;
76

src/test/run-pass/issues/issue-51345.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22
#![allow(unreachable_code)]
3-
#![feature(nll)]
43

54
fn main() {
65
let mut v = Vec::new();

src/test/run-pass/nll/issue-47153-generic-const.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Regression test for #47153: constants in a generic context (such as
44
// a trait) used to ICE.
55

6-
#![feature(nll)]
76
#![allow(warnings)]
87

98
trait Foo {

src/test/run-pass/nll/issue-47589.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// run-pass
22

3-
#![feature(nll)]
4-
53
pub struct DescriptorSet<'a> {
64
pub slots: Vec<AttachInfo<'a, Resources>>
75
}

src/test/run-pass/nll/issue-48623-closure.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#![allow(path_statements)]
33
#![allow(dead_code)]
44

5-
#![feature(nll)]
6-
75
struct WithDrop;
86

97
impl Drop for WithDrop {

src/test/run-pass/nll/issue-48623-generator.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![allow(path_statements)]
33
#![allow(dead_code)]
44

5-
#![feature(nll)]
65
#![feature(generators, generator_trait)]
76

87
struct WithDrop;

src/test/run-pass/nll/issue-50343.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22

3-
#![feature(nll)]
43
#![deny(unused_mut)]
54

65
fn main() {

src/test/run-pass/nll/issue-50461-used-mut-from-moves.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22

3-
#![feature(nll)]
43
#![deny(unused_mut)]
54

65
struct Foo {

src/test/run-pass/nll/issue-53123-raw-pointer-cast.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22

3-
#![feature(nll)]
43
#![allow(unused_variables)]
54

65
pub trait TryTransform {

src/test/run-pass/nll/mutating_references.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// run-pass
22

3-
#![feature(nll)]
4-
53
struct List<T> {
64
value: T,
75
next: Option<Box<List<T>>>,

src/test/run-pass/nll/process_or_insert_default.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// run-pass
22

3-
#![feature(nll)]
4-
53
use std::collections::HashMap;
64

75
fn process_or_insert_default(map: &mut HashMap<usize, String>, key: usize) {

src/test/run-pass/nll/rc-loop.rs

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// `x`. The lexical checker makes this very painful. The NLL checker
77
// does not.
88

9-
#![feature(nll)]
10-
119
use std::rc::Rc;
1210

1311
#[derive(Debug, PartialEq, Eq)]

src/test/ui/borrowck/borrowck-issue-48962.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(nll)]
2-
31
struct Node {
42
elem: i32,
53
next: Option<Box<Node>>,

src/test/ui/borrowck/borrowck-issue-48962.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0382]: use of moved value: `src`
2-
--> $DIR/borrowck-issue-48962.rs:16:5
2+
--> $DIR/borrowck-issue-48962.rs:14:5
33
|
44
LL | let mut src = &mut node;
55
| ------- move occurs because `src` has type `&mut Node`, which does not implement the `Copy` trait
@@ -9,7 +9,7 @@ LL | src.next = None;
99
| ^^^^^^^^ value used here after move
1010

1111
error[E0382]: use of moved value: `src`
12-
--> $DIR/borrowck-issue-48962.rs:22:5
12+
--> $DIR/borrowck-issue-48962.rs:20:5
1313
|
1414
LL | let mut src = &mut (22, 44);
1515
| ------- move occurs because `src` has type `&mut (i32, i32)`, which does not implement the `Copy` trait

src/test/ui/borrowck/issue-10876.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// run-pass
22

3-
#![feature(nll)]
4-
53
enum Nat {
64
S(Box<Nat>),
75
Z

src/test/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
// run-pass
1010

11-
#![feature(nll)]
12-
1311
fn foo(x: &mut Result<(u32, u32), (u32, u32)>) -> u32 {
1412
match *x {
1513
Ok((ref mut v, _)) | Err((_, ref mut v)) if *v > 0 => { *v }

src/test/ui/borrowck/issue-52713-bug.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// computing liveness that wound up accidentally causing the program
33
// below to be accepted.
44

5-
#![feature(nll)]
6-
75
fn foo<'a>(x: &'a mut u32) -> u32 {
86
let mut x = 22;
97
let y = &x;

src/test/ui/borrowck/issue-52713-bug.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0506]: cannot assign to `x` because it is borrowed
2-
--> $DIR/issue-52713-bug.rs:14:5
2+
--> $DIR/issue-52713-bug.rs:12:5
33
|
44
LL | let y = &x;
55
| -- borrow of `x` occurs here

src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(nll)]
2-
31
#![allow(dead_code)]
42

53
#[derive(Debug)]

src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0507]: cannot move out of borrowed content
2-
--> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:16:13
2+
--> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:14:13
33
|
44
LL | *array
55
| ^^^^^^
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
// ignore-compare-mode-nll
2-
3-
// revisions: migrate nll
4-
5-
#![cfg_attr(nll, feature(nll))]
6-
71
fn main() {
82
let mut greeting = "Hello world!".to_string();
93
let res = (|| (|| &greeting)())();
104

115
greeting = "DEALLOCATED".to_string();
12-
//[migrate]~^ ERROR cannot assign
13-
//[nll]~^^ ERROR cannot assign
6+
//~^ ERROR cannot assign
147
drop(greeting);
15-
//[migrate]~^ ERROR cannot move
16-
//[nll]~^^ ERROR cannot move
8+
//~^ ERROR cannot move
179

1810
println!("thread result: {:?}", res);
1911
}

src/test/ui/borrowck/issue-58776-borrowck-scans-children.nll.stderr src/test/ui/borrowck/issue-58776-borrowck-scans-children.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0506]: cannot assign to `greeting` because it is borrowed
2-
--> $DIR/issue-58776-borrowck-scans-children.rs:11:5
2+
--> $DIR/issue-58776-borrowck-scans-children.rs:5:5
33
|
44
LL | let res = (|| (|| &greeting)())();
55
| -- -------- borrow occurs due to use in closure
@@ -13,7 +13,7 @@ LL | println!("thread result: {:?}", res);
1313
| --- borrow later used here
1414

1515
error[E0505]: cannot move out of `greeting` because it is borrowed
16-
--> $DIR/issue-58776-borrowck-scans-children.rs:14:10
16+
--> $DIR/issue-58776-borrowck-scans-children.rs:7:10
1717
|
1818
LL | let res = (|| (|| &greeting)())();
1919
| -- -------- borrow occurs due to use in closure

src/test/ui/borrowck/two-phase-across-loop.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Test that a borrow which starts as a 2-phase borrow and gets
22
// carried around a loop winds up conflicting with itself.
33

4-
#![feature(nll)]
5-
64
struct Foo { x: String }
75

86
impl Foo {

src/test/ui/borrowck/two-phase-across-loop.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0499]: cannot borrow `foo` as mutable more than once at a time
2-
--> $DIR/two-phase-across-loop.rs:19:22
2+
--> $DIR/two-phase-across-loop.rs:17:22
33
|
44
LL | strings.push(foo.get_string());
55
| ^^^ mutable borrow starts here in previous iteration of loop

src/test/ui/borrowck/two-phase-multi-mut.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(nll)]
2-
31
struct Foo {
42
}
53

src/test/ui/borrowck/two-phase-multi-mut.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0499]: cannot borrow `foo` as mutable more than once at a time
2-
--> $DIR/two-phase-multi-mut.rs:13:5
2+
--> $DIR/two-phase-multi-mut.rs:11:5
33
|
44
LL | foo.method(&mut foo);
55
| ^^^^------^--------^
@@ -9,7 +9,7 @@ LL | foo.method(&mut foo);
99
| second mutable borrow occurs here
1010

1111
error[E0499]: cannot borrow `foo` as mutable more than once at a time
12-
--> $DIR/two-phase-multi-mut.rs:13:16
12+
--> $DIR/two-phase-multi-mut.rs:11:16
1313
|
1414
LL | foo.method(&mut foo);
1515
| --- ------ ^^^^^^^^ second mutable borrow occurs here

src/test/ui/c-variadic/variadic-ffi-5.rs

-31
This file was deleted.

0 commit comments

Comments
 (0)