Skip to content

Commit

Permalink
Auto merge of #54223 - pnkfelix:issue-53764-uiify-run-pass, r=nikomat…
Browse files Browse the repository at this point in the history
…sakis

`ui`ify run-pass

This addresses the remainder of #53764 by first converting `src/test/run-pass` into another `ui`-style test suite, and then turning on `compare-mode=nll` for that new suite.

After this lands, we can address #54047 for the short term by moving all the `src/test/ui/run-pass` tests back to `src/test/run-pass`.

(Longer term, the compiler team's current (hypothetical sketch of a) plan (see [1][], [2][]) is unify all the tests by embedding these meta-properties like "// run-pass` into their headers explicitly and dropping the significance of their location on the file system.)

[1]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/subject/weekly.20meeting.202018-09-13/near/133889370
[2]: #54047 (comment)
  • Loading branch information
bors committed Sep 21, 2018
2 parents 1002e40 + a79db05 commit 63c75d3
Show file tree
Hide file tree
Showing 238 changed files with 463 additions and 20 deletions.
5 changes: 3 additions & 2 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -755,10 +755,11 @@ default_test_with_compare_mode!(Ui {
compare_mode: "nll"
});

default_test!(RunPass {
default_test_with_compare_mode!(RunPass {
path: "src/test/run-pass",
mode: "run-pass",
suite: "run-pass"
suite: "run-pass",
compare_mode: "nll"
});

default_test!(CompileFail {
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_imports)]
// ignore-cross-compile

#![feature(rustc_private)]
Expand Down
6 changes: 6 additions & 0 deletions src/test/run-pass-fulldeps/custom-derive-partial-eq.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
warning: `#[derive]` for custom traits is deprecated and will be removed in the future. Prefer using procedural macro custom derive.
--> $DIR/custom-derive-partial-eq.rs:17:10
|
LL | #[derive(CustomPartialEq)] // Check that this is not a stability error.
| ^^^^^^^^^^^^^^^

1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/derive-no-std-not-supported.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code)]
#![feature(rustc_private)]
#![no_std]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_imports)]

#![feature(box_syntax)]
#![feature(rustc_private)]

extern crate serialize;
use serialize as rustc_serialize;

use serialize::{Encodable, Decodable};
use serialize::json;

#[derive(Encodable, Decodable)]
#[derive(RustcEncodable, RustcDecodable)]
struct A {
foo: Box<[bool]>,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,26 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_imports)]
// This briefly tests the capability of `Cell` and `RefCell` to implement the
// `Encodable` and `Decodable` traits via `#[derive(Encodable, Decodable)]`


#![feature(rustc_private)]

extern crate serialize;
use serialize as rustc_serialize;

use std::cell::{Cell, RefCell};
use serialize::{Encodable, Decodable};
use serialize::json;

#[derive(Encodable, Decodable)]
#[derive(RustcEncodable, RustcDecodable)]
struct A {
baz: isize
}

#[derive(Encodable, Decodable)]
#[derive(RustcEncodable, RustcDecodable)]
struct B {
foo: Cell<bool>,
bar: RefCell<A>,
Expand Down
7 changes: 4 additions & 3 deletions src/test/run-pass-fulldeps/deriving-global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#![feature(rustc_private)]

extern crate serialize;
use serialize as rustc_serialize;

mod submod {
// if any of these are implemented without global calls for any
Expand All @@ -20,21 +21,21 @@ mod submod {
Hash,
Clone,
Debug,
Encodable, Decodable)]
RustcEncodable, RustcDecodable)]
enum A { A1(usize), A2(isize) }

#[derive(PartialEq, PartialOrd, Eq, Ord,
Hash,
Clone,
Debug,
Encodable, Decodable)]
RustcEncodable, RustcDecodable)]
struct B { x: usize, y: isize }

#[derive(PartialEq, PartialOrd, Eq, Ord,
Hash,
Clone,
Debug,
Encodable, Decodable)]
RustcEncodable, RustcDecodable)]
struct C(usize, isize);

}
Expand Down
4 changes: 3 additions & 1 deletion src/test/run-pass-fulldeps/deriving-hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(non_upper_case_globals)]
#![feature(rustc_private)]
extern crate serialize;
use serialize as rustc_serialize;

pub const other: u8 = 1;
pub const f: u8 = 1;
Expand All @@ -18,7 +20,7 @@ pub const s: u8 = 1;
pub const state: u8 = 1;
pub const cmp: u8 = 1;

#[derive(Ord,Eq,PartialOrd,PartialEq,Debug,Decodable,Encodable,Hash)]
#[derive(Ord,Eq,PartialOrd,PartialEq,Debug,RustcDecodable,RustcEncodable,Hash)]
struct Foo {}

fn main() {
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unknown_lints)]
// Check that an arena (TypedArena) can carry elements whose drop
// methods might access borrowed data, as long as the borrowed data
// has lifetime that strictly outlives the arena itself.
Expand Down
8 changes: 6 additions & 2 deletions src/test/run-pass-fulldeps/issue-11881.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_must_use)]
#![allow(dead_code)]
#![allow(unused_imports)]

#![feature(rustc_private)]

extern crate serialize;
use serialize as rustc_serialize;

use std::io::Cursor;
use std::io::prelude::*;
Expand All @@ -22,12 +26,12 @@ use serialize::{Encodable, Encoder};
use serialize::json;
use serialize::opaque;

#[derive(Encodable)]
#[derive(RustcEncodable)]
struct Foo {
baz: bool,
}

#[derive(Encodable)]
#[derive(RustcEncodable)]
struct Bar {
froboz: usize,
}
Expand Down
5 changes: 4 additions & 1 deletion src/test/run-pass-fulldeps/issue-14021.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_mut)]
#![allow(unused_imports)]
#![feature(rustc_private)]

extern crate serialize;
extern crate serialize as rustc_serialize;

use serialize::{Encodable, Decodable};
use serialize::json;

#[derive(Encodable, Decodable, PartialEq, Debug)]
#[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
struct UnitLikeStruct;

pub fn main() {
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/issue-15149.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_variables)]
// no-prefer-dynamic
// ignore-cross-compile

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/issue-15924.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_imports)]
#![allow(unused_must_use)]
// pretty-expanded FIXME #23616

#![feature(rustc_private)]
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code)]
#![allow(unused_imports)]
// ignore-cross-compile
#![feature(quote, rustc_private)]

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/issue-24972.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code)]
#![feature(rustc_private)]

extern crate serialize;
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/issue-2804.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(non_camel_case_types)]
#![allow(dead_code)]
#![feature(rustc_private)]

extern crate serialize;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/issue-4016.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code)]

#![feature(rustc_private)]

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/issue-40663.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code)]
// aux-build:custom_derive_plugin.rs
// ignore-stage1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(plugin_as_library)]
#![allow(unused_imports)]
// aux-build:macro_crate_test.rs
// ignore-stage1

Expand Down
4 changes: 4 additions & 0 deletions src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(plugin_as_library)]
#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(unused_imports)]
// aux-build:macro_crate_test.rs
// ignore-stage1

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/macro-crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(plugin_as_library)]
#![allow(dead_code)]
// aux-build:macro_crate_test.rs
// ignore-stage1

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/macro-quote-cond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_parens)]
// aux-build:cond_plugin.rs
// ignore-stage1

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/proc-macro/call-site.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_variables)]
#![allow(unused_imports)]
// aux-build:call-site.rs
// ignore-stage1

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/derive-attr-cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code)]
// aux-build:derive-attr-cfg.rs
// ignore-stage1

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/proc-macro/derive-same-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(path_statements)]
#![allow(dead_code)]
// aux-build:derive-same-struct.rs
// ignore-stage1

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
input1: "struct A;"
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code)]
// aux-build:derive-two-attrs.rs

extern crate derive_two_attrs as foo;
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/derive-union.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_variables)]
// aux-build:derive-union.rs
// ignore-stage1

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/empty-crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_imports)]
// aux-build:empty-crate.rs
// ignore-stage1

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_macros)]
// aux-build:hygiene_example_codegen.rs
// aux-build:hygiene_example.rs
// ignore-stage1
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/issue-39889.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(dead_code)]
// aux-build:issue-39889.rs
// ignore-stage1

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/issue-50061.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(path_statements)]
// aux-build:issue-50061.rs
// ignore-stage1

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_variables)]
// aux-build:lifetimes.rs
// ignore-stage1

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/proc-macro/load-two.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(path_statements)]
#![allow(dead_code)]
// aux-build:derive-atob.rs
// aux-build:derive-ctod.rs
// ignore-stage1
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/proc-macro/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused_must_use)]
#![allow(path_statements)]
// aux-build:derive-a.rs
// ignore-stage1

Expand Down
Loading

0 comments on commit 63c75d3

Please sign in to comment.