Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uiify run-pass #54223

Merged
merged 18 commits into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
ddb1a2a
Make `src/test/run-pass/` act like an alternative `ui` test suite.
pnkfelix Sep 14, 2018
ae0a53a
Support `// skip-codegen` in header of ui tests
pnkfelix Sep 14, 2018
d28c5ba
Provide way for ui tests to opt out of having their output checked.
pnkfelix Sep 14, 2018
c9f2c2d
Allow various lints as part of ui-ifying `src/test/run-pass` suite.
pnkfelix Sep 14, 2018
371fffd
Workaround rust-lang/rust#54222 by just ignoring the warning about th…
pnkfelix Sep 14, 2018
5def991
Ignore the output itself on `rustc-rust-log.rs` (added in rust-lang/r…
pnkfelix Sep 14, 2018
6219448
Add expected output for compiler to tests of optimization-fuel-{0,1}.rs.
pnkfelix Sep 14, 2018
2664db2
Run the newly `ui`-ified run-pass tests under `compare-mode=nll` as w…
pnkfelix Sep 14, 2018
a66b7d4
Mark `ParseFail` as tests that are not expected to compile.
pnkfelix Sep 15, 2018
bae2bf1
Similar to above, failed to notice that `Mode::Incremental` delegates…
pnkfelix Sep 15, 2018
1df6d42
you can have `// compile-pass` markers in headers of `compile-fail/` …
pnkfelix Sep 17, 2018
43061d3
Allow various lints in `src/test/run-pass-fulldeps/` so that it can c…
pnkfelix Sep 17, 2018
3a44115
Add `Rustc` prefixes to `derive(Decodable, Encodable)`.
pnkfelix Sep 17, 2018
9e33d57
Added expected (compile-time) outputs.
pnkfelix Sep 17, 2018
1eb8690
Make the `// skip-codegen` property apply to ui tests too.
pnkfelix Sep 19, 2018
23e7e78
Added comment above `Mode::RunPass` noting that it now behaves like `…
pnkfelix Sep 19, 2018
3b585f1
Allow dead_code lint on some tests where the lint only fires on non-x…
pnkfelix Sep 19, 2018
a79db05
Allow unused_imports lint on test where lint only fires on non-linux …
pnkfelix Sep 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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