Skip to content

Commit 63c75d3

Browse files
committed
Auto merge of #54223 - pnkfelix:issue-53764-uiify-run-pass, r=nikomatsakis
`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)
2 parents 1002e40 + a79db05 commit 63c75d3

File tree

238 files changed

+463
-20
lines changed

Some content is hidden

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

238 files changed

+463
-20
lines changed

src/bootstrap/test.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -755,10 +755,11 @@ default_test_with_compare_mode!(Ui {
755755
compare_mode: "nll"
756756
});
757757

758-
default_test!(RunPass {
758+
default_test_with_compare_mode!(RunPass {
759759
path: "src/test/run-pass",
760760
mode: "run-pass",
761-
suite: "run-pass"
761+
suite: "run-pass",
762+
compare_mode: "nll"
762763
});
763764

764765
default_test!(CompileFail {

src/test/run-pass-fulldeps/ast_stmt_expr_attr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_imports)]
1112
// ignore-cross-compile
1213

1314
#![feature(rustc_private)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
warning: `#[derive]` for custom traits is deprecated and will be removed in the future. Prefer using procedural macro custom derive.
2+
--> $DIR/custom-derive-partial-eq.rs:17:10
3+
|
4+
LL | #[derive(CustomPartialEq)] // Check that this is not a stability error.
5+
| ^^^^^^^^^^^^^^^
6+

src/test/run-pass-fulldeps/derive-no-std-not-supported.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(dead_code)]
1112
#![feature(rustc_private)]
1213
#![no_std]
1314

src/test/run-pass-fulldeps/deriving-encodable-decodable-box.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_imports)]
1112

1213
#![feature(box_syntax)]
1314
#![feature(rustc_private)]
1415

1516
extern crate serialize;
17+
use serialize as rustc_serialize;
1618

1719
use serialize::{Encodable, Decodable};
1820
use serialize::json;
1921

20-
#[derive(Encodable, Decodable)]
22+
#[derive(RustcEncodable, RustcDecodable)]
2123
struct A {
2224
foo: Box<[bool]>,
2325
}

src/test/run-pass-fulldeps/deriving-encodable-decodable-cell-refcell.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,26 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

1415

1516
#![feature(rustc_private)]
1617

1718
extern crate serialize;
19+
use serialize as rustc_serialize;
1820

1921
use std::cell::{Cell, RefCell};
2022
use serialize::{Encodable, Decodable};
2123
use serialize::json;
2224

23-
#[derive(Encodable, Decodable)]
25+
#[derive(RustcEncodable, RustcDecodable)]
2426
struct A {
2527
baz: isize
2628
}
2729

28-
#[derive(Encodable, Decodable)]
30+
#[derive(RustcEncodable, RustcDecodable)]
2931
struct B {
3032
foo: Cell<bool>,
3133
bar: RefCell<A>,

src/test/run-pass-fulldeps/deriving-global.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#![feature(rustc_private)]
1212

1313
extern crate serialize;
14+
use serialize as rustc_serialize;
1415

1516
mod submod {
1617
// if any of these are implemented without global calls for any
@@ -20,21 +21,21 @@ mod submod {
2021
Hash,
2122
Clone,
2223
Debug,
23-
Encodable, Decodable)]
24+
RustcEncodable, RustcDecodable)]
2425
enum A { A1(usize), A2(isize) }
2526

2627
#[derive(PartialEq, PartialOrd, Eq, Ord,
2728
Hash,
2829
Clone,
2930
Debug,
30-
Encodable, Decodable)]
31+
RustcEncodable, RustcDecodable)]
3132
struct B { x: usize, y: isize }
3233

3334
#[derive(PartialEq, PartialOrd, Eq, Ord,
3435
Hash,
3536
Clone,
3637
Debug,
37-
Encodable, Decodable)]
38+
RustcEncodable, RustcDecodable)]
3839
struct C(usize, isize);
3940

4041
}

src/test/run-pass-fulldeps/deriving-hygiene.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(non_upper_case_globals)]
1112
#![feature(rustc_private)]
1213
extern crate serialize;
14+
use serialize as rustc_serialize;
1315

1416
pub const other: u8 = 1;
1517
pub const f: u8 = 1;
@@ -18,7 +20,7 @@ pub const s: u8 = 1;
1820
pub const state: u8 = 1;
1921
pub const cmp: u8 = 1;
2022

21-
#[derive(Ord,Eq,PartialOrd,PartialEq,Debug,Decodable,Encodable,Hash)]
23+
#[derive(Ord,Eq,PartialOrd,PartialEq,Debug,RustcDecodable,RustcEncodable,Hash)]
2224
struct Foo {}
2325

2426
fn main() {

src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_lints)]
1112
// Check that an arena (TypedArena) can carry elements whose drop
1213
// methods might access borrowed data, as long as the borrowed data
1314
// has lifetime that strictly outlives the arena itself.

src/test/run-pass-fulldeps/issue-11881.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_must_use)]
12+
#![allow(dead_code)]
13+
#![allow(unused_imports)]
1114

1215
#![feature(rustc_private)]
1316

1417
extern crate serialize;
18+
use serialize as rustc_serialize;
1519

1620
use std::io::Cursor;
1721
use std::io::prelude::*;
@@ -22,12 +26,12 @@ use serialize::{Encodable, Encoder};
2226
use serialize::json;
2327
use serialize::opaque;
2428

25-
#[derive(Encodable)]
29+
#[derive(RustcEncodable)]
2630
struct Foo {
2731
baz: bool,
2832
}
2933

30-
#[derive(Encodable)]
34+
#[derive(RustcEncodable)]
3135
struct Bar {
3236
froboz: usize,
3337
}

src/test/run-pass-fulldeps/issue-14021.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_mut)]
12+
#![allow(unused_imports)]
1113
#![feature(rustc_private)]
1214

1315
extern crate serialize;
16+
extern crate serialize as rustc_serialize;
1417

1518
use serialize::{Encodable, Decodable};
1619
use serialize::json;
1720

18-
#[derive(Encodable, Decodable, PartialEq, Debug)]
21+
#[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
1922
struct UnitLikeStruct;
2023

2124
pub fn main() {

src/test/run-pass-fulldeps/issue-15149.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_variables)]
1112
// no-prefer-dynamic
1213
// ignore-cross-compile
1314

src/test/run-pass-fulldeps/issue-15924.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_imports)]
12+
#![allow(unused_must_use)]
1113
// pretty-expanded FIXME #23616
1214

1315
#![feature(rustc_private)]

src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(dead_code)]
12+
#![allow(unused_imports)]
1113
// ignore-cross-compile
1214
#![feature(quote, rustc_private)]
1315

src/test/run-pass-fulldeps/issue-24972.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(dead_code)]
1112
#![feature(rustc_private)]
1213

1314
extern crate serialize;

src/test/run-pass-fulldeps/issue-2804.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(non_camel_case_types)]
12+
#![allow(dead_code)]
1113
#![feature(rustc_private)]
1214

1315
extern crate serialize;

src/test/run-pass-fulldeps/issue-4016.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(dead_code)]
1112

1213
#![feature(rustc_private)]
1314

src/test/run-pass-fulldeps/issue-40663.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(dead_code)]
1112
// aux-build:custom_derive_plugin.rs
1213
// ignore-stage1
1314

src/test/run-pass-fulldeps/macro-crate-multi-decorator-literals.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(plugin_as_library)]
12+
#![allow(unused_imports)]
1113
// aux-build:macro_crate_test.rs
1214
// ignore-stage1
1315

src/test/run-pass-fulldeps/macro-crate-multi-decorator.rs

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(plugin_as_library)]
12+
#![allow(dead_code)]
13+
#![allow(unused_variables)]
14+
#![allow(unused_imports)]
1115
// aux-build:macro_crate_test.rs
1216
// ignore-stage1
1317

src/test/run-pass-fulldeps/macro-crate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(plugin_as_library)]
12+
#![allow(dead_code)]
1113
// aux-build:macro_crate_test.rs
1214
// ignore-stage1
1315

src/test/run-pass-fulldeps/macro-quote-cond.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_parens)]
1112
// aux-build:cond_plugin.rs
1213
// ignore-stage1
1314

src/test/run-pass-fulldeps/proc-macro/call-site.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_variables)]
12+
#![allow(unused_imports)]
1113
// aux-build:call-site.rs
1214
// ignore-stage1
1315

src/test/run-pass-fulldeps/proc-macro/derive-attr-cfg.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

src/test/run-pass-fulldeps/proc-macro/derive-same-struct.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(path_statements)]
12+
#![allow(dead_code)]
1113
// aux-build:derive-same-struct.rs
1214
// ignore-stage1
1315

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
input1: "struct A;"

src/test/run-pass-fulldeps/proc-macro/derive-two-attrs.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

1314
extern crate derive_two_attrs as foo;

src/test/run-pass-fulldeps/proc-macro/derive-union.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_variables)]
1112
// aux-build:derive-union.rs
1213
// ignore-stage1
1314

src/test/run-pass-fulldeps/proc-macro/empty-crate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_imports)]
1112
// aux-build:empty-crate.rs
1213
// ignore-stage1
1314

src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_macros)]
1112
// aux-build:hygiene_example_codegen.rs
1213
// aux-build:hygiene_example.rs
1314
// ignore-stage1

src/test/run-pass-fulldeps/proc-macro/issue-39889.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(dead_code)]
1112
// aux-build:issue-39889.rs
1213
// ignore-stage1
1314

src/test/run-pass-fulldeps/proc-macro/issue-50061.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(path_statements)]
1112
// aux-build:issue-50061.rs
1213
// ignore-stage1
1314

src/test/run-pass-fulldeps/proc-macro/lifetimes.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_variables)]
1112
// aux-build:lifetimes.rs
1213
// ignore-stage1
1314

src/test/run-pass-fulldeps/proc-macro/load-two.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(path_statements)]
12+
#![allow(dead_code)]
1113
// aux-build:derive-atob.rs
1214
// aux-build:derive-ctod.rs
1315
// ignore-stage1

src/test/run-pass-fulldeps/proc-macro/smoke.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unused_must_use)]
12+
#![allow(path_statements)]
1113
// aux-build:derive-a.rs
1214
// ignore-stage1
1315

0 commit comments

Comments
 (0)