Skip to content

Commit

Permalink
Remove feature(nll) when compare mode is sufficient
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed May 12, 2019
1 parent ff71b80 commit be5fe05
Show file tree
Hide file tree
Showing 301 changed files with 761 additions and 1,016 deletions.
1 change: 0 additions & 1 deletion src/test/codegen/enum-debug-niche-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "Error",{{.*}}extraData: i64 0{{[,)].*}}

#![feature(never_type)]
#![feature(nll)]

#[derive(Copy, Clone)]
pub struct Entity {
Expand Down
2 changes: 0 additions & 2 deletions src/test/mir-opt/remove_fake_borrows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

// ignore-wasm32-bare

#![feature(nll)]

fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
match x {
Some(0) if c => 0,
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-fail/issue-51345.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// error-pattern: thread 'main' panicked at 'explicit panic'

#![feature(nll)]

fn main() {
let mut vec = vec![];
vec.push((vec.len(), panic!()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#![allow(unused_variables)]
// Test case from #39963.

#![feature(nll)]

#[derive(Clone)]
struct Foo(Option<Box<Foo>>, Option<Box<Foo>>);

Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// run-pass
#![feature(nll)]
#![deny(unused_mut)]

#[derive(Debug)]
Expand Down
4 changes: 0 additions & 4 deletions src/test/run-pass/borrowck/two-phase-bin-ops.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// run-pass
// revisions: lxl nll

#![cfg_attr(nll, feature(nll))]

use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
use std::ops::{BitAndAssign, BitOrAssign, BitXorAssign, ShlAssign, ShrAssign};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// See further discussion on rust-lang/rust#24535,
// rust-lang/rfcs#1006, and rust-lang/rfcs#107

#![feature(nll)]
#![feature(bind_by_move_pattern_guards)]

fn main() {
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/issues/issue-48962.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// run-pass
#![allow(unused_must_use)]
// Test that we are able to reinitialize box with moved referent
#![feature(nll)]
static mut ORDER: [usize; 3] = [0, 0, 0];
static mut INDEX: usize = 0;

Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/issues/issue-51345.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// run-pass
#![allow(unreachable_code)]
#![feature(nll)]

fn main() {
let mut v = Vec::new();
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/nll/issue-47153-generic-const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Regression test for #47153: constants in a generic context (such as
// a trait) used to ICE.

#![feature(nll)]
#![allow(warnings)]

trait Foo {
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/nll/issue-47589.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// run-pass

#![feature(nll)]

pub struct DescriptorSet<'a> {
pub slots: Vec<AttachInfo<'a, Resources>>
}
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/nll/issue-48623-closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#![allow(path_statements)]
#![allow(dead_code)]

#![feature(nll)]

struct WithDrop;

impl Drop for WithDrop {
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/nll/issue-48623-generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#![allow(path_statements)]
#![allow(dead_code)]

#![feature(nll)]
#![feature(generators, generator_trait)]

struct WithDrop;
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/nll/issue-50343.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// run-pass

#![feature(nll)]
#![deny(unused_mut)]

fn main() {
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/nll/issue-50461-used-mut-from-moves.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// run-pass

#![feature(nll)]
#![deny(unused_mut)]

struct Foo {
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/nll/issue-53123-raw-pointer-cast.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// run-pass

#![feature(nll)]
#![allow(unused_variables)]

pub trait TryTransform {
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/nll/mutating_references.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// run-pass

#![feature(nll)]

struct List<T> {
value: T,
next: Option<Box<List<T>>>,
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/nll/process_or_insert_default.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// run-pass

#![feature(nll)]

use std::collections::HashMap;

fn process_or_insert_default(map: &mut HashMap<usize, String>, key: usize) {
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/nll/rc-loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
// `x`. The lexical checker makes this very painful. The NLL checker
// does not.

#![feature(nll)]

use std::rc::Rc;

#[derive(Debug, PartialEq, Eq)]
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/borrowck/borrowck-issue-48962.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(nll)]

struct Node {
elem: i32,
next: Option<Box<Node>>,
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/borrowck/borrowck-issue-48962.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0382]: use of moved value: `src`
--> $DIR/borrowck-issue-48962.rs:16:5
--> $DIR/borrowck-issue-48962.rs:14:5
|
LL | let mut src = &mut node;
| ------- move occurs because `src` has type `&mut Node`, which does not implement the `Copy` trait
Expand All @@ -9,7 +9,7 @@ LL | src.next = None;
| ^^^^^^^^ value used here after move

error[E0382]: use of moved value: `src`
--> $DIR/borrowck-issue-48962.rs:22:5
--> $DIR/borrowck-issue-48962.rs:20:5
|
LL | let mut src = &mut (22, 44);
| ------- move occurs because `src` has type `&mut (i32, i32)`, which does not implement the `Copy` trait
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/borrowck/issue-10876.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// run-pass

#![feature(nll)]

enum Nat {
S(Box<Nat>),
Z
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

// run-pass

#![feature(nll)]

fn foo(x: &mut Result<(u32, u32), (u32, u32)>) -> u32 {
match *x {
Ok((ref mut v, _)) | Err((_, ref mut v)) if *v > 0 => { *v }
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/borrowck/issue-52713-bug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// computing liveness that wound up accidentally causing the program
// below to be accepted.

#![feature(nll)]

fn foo<'a>(x: &'a mut u32) -> u32 {
let mut x = 22;
let y = &x;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/issue-52713-bug.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0506]: cannot assign to `x` because it is borrowed
--> $DIR/issue-52713-bug.rs:14:5
--> $DIR/issue-52713-bug.rs:12:5
|
LL | let y = &x;
| -- borrow of `x` occurs here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(nll)]

#![allow(dead_code)]

#[derive(Debug)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0507]: cannot move out of borrowed content
--> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:16:13
--> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:14:13
|
LL | *array
| ^^^^^^
Expand Down
12 changes: 2 additions & 10 deletions src/test/ui/borrowck/issue-58776-borrowck-scans-children.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
// ignore-compare-mode-nll

// revisions: migrate nll

#![cfg_attr(nll, feature(nll))]

fn main() {
let mut greeting = "Hello world!".to_string();
let res = (|| (|| &greeting)())();

greeting = "DEALLOCATED".to_string();
//[migrate]~^ ERROR cannot assign
//[nll]~^^ ERROR cannot assign
//~^ ERROR cannot assign
drop(greeting);
//[migrate]~^ ERROR cannot move
//[nll]~^^ ERROR cannot move
//~^ ERROR cannot move

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

error[E0505]: cannot move out of `greeting` because it is borrowed
--> $DIR/issue-58776-borrowck-scans-children.rs:14:10
--> $DIR/issue-58776-borrowck-scans-children.rs:7:10
|
LL | let res = (|| (|| &greeting)())();
| -- -------- borrow occurs due to use in closure
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/borrowck/two-phase-across-loop.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Test that a borrow which starts as a 2-phase borrow and gets
// carried around a loop winds up conflicting with itself.

#![feature(nll)]

struct Foo { x: String }

impl Foo {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/two-phase-across-loop.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> $DIR/two-phase-across-loop.rs:19:22
--> $DIR/two-phase-across-loop.rs:17:22
|
LL | strings.push(foo.get_string());
| ^^^ mutable borrow starts here in previous iteration of loop
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/borrowck/two-phase-multi-mut.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(nll)]

struct Foo {
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/borrowck/two-phase-multi-mut.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> $DIR/two-phase-multi-mut.rs:13:5
--> $DIR/two-phase-multi-mut.rs:11:5
|
LL | foo.method(&mut foo);
| ^^^^------^--------^
Expand All @@ -9,7 +9,7 @@ LL | foo.method(&mut foo);
| second mutable borrow occurs here

error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> $DIR/two-phase-multi-mut.rs:13:16
--> $DIR/two-phase-multi-mut.rs:11:16
|
LL | foo.method(&mut foo);
| --- ------ ^^^^^^^^ second mutable borrow occurs here
Expand Down
31 changes: 0 additions & 31 deletions src/test/ui/c-variadic/variadic-ffi-5.rs

This file was deleted.

Loading

0 comments on commit be5fe05

Please sign in to comment.