Skip to content

Commit

Permalink
tests: prefer edition: directives to compile-flags:--edition.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Aug 16, 2018
1 parent 2c44026 commit 32e17b5
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/test/run-pass/macro-at-most-once-rep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//
// This test focuses on non-error cases and making sure the correct number of repetitions happen.

// compile-flags: --edition=2018
// edition:2018

#![feature(macro_at_most_once_rep)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// aux-build:suggestions-not-always-applicable.rs
// compile-flags: --edition 2015
// edition:2015
// run-rustfix
// rustfix-only-machine-applicable
// compile-pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// aux-build:suggestions-not-always-applicable.rs
// compile-flags: --edition 2015
// edition:2015
// run-rustfix
// rustfix-only-machine-applicable
// compile-pass
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui-fulldeps/unnecessary-extern-crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// compile-flags: --edition 2018
// edition:2018

#![deny(unused_extern_crates)]
#![feature(alloc, test, libc)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// revisions: zflag edition
// [zflag]compile-flags: -Z borrowck=migrate
// [edition]compile-flags: --edition 2018
// [edition]edition:2018

#![feature(nll)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/borrowck-migrate-to-nll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

// revisions: zflag edition
//[zflag]compile-flags: -Z borrowck=migrate
//[edition]compile-flags: --edition 2018
//[edition]edition:2018
//[zflag] run-pass
//[edition] run-pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// revisions: ast zflags edition
//[zflags]compile-flags: -Z borrowck=migrate -Z two-phase-borrows
//[edition]compile-flags: --edition 2018
//[edition]edition:2018

// run-pass

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/editions/edition-extern-crate-allowed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// aux-build:edition-extern-crate-allowed.rs
// compile-flags: --edition 2015
// edition:2015
// compile-pass

#![warn(rust_2018_idioms)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/in-band-lifetimes/elided-lifetimes.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// run-rustfix
// compile-flags: --edition 2018
// edition:2018

#![allow(unused)]
#![deny(elided_lifetimes_in_paths)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/in-band-lifetimes/elided-lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// run-rustfix
// compile-flags: --edition 2018
// edition:2018

#![allow(unused)]
#![deny(elided_lifetimes_in_paths)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// with the feature flag.

// gate-test-macro_at_most_once_rep
// compile-flags: --edition=2015
// edition:2015

#![feature(macro_at_most_once_rep)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// Test behavior of `?` macro _kleene op_ under the 2015 edition. Namely, it doesn't exist.

// compile-flags: --edition=2015
// edition:2015

macro_rules! bar {
($(a)?) => {} //~ERROR expected `*` or `+`
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Test behavior of `?` macro _separator_ under the 2015 edition. Namely, `?` can be used as a
// separator, but you get a migration warning for the edition.

// compile-flags: --edition=2015
// edition:2015
// compile-pass

#![warn(rust_2018_compatibility)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Feature gate test for macro_at_most_once_rep under 2018 edition.

// gate-test-macro_at_most_once_rep
// compile-flags: --edition=2018
// edition:2018

macro_rules! foo {
($(a)?) => {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/macros/macro-at-most-once-rep-2018.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// Tests that `?` is a Kleene op and not a macro separator in the 2018 edition.

// compile-flags: --edition=2018
// edition:2018

#![feature(macro_at_most_once_rep)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/removing-extern-crate.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// compile-flags: --edition 2018
// edition:2018
// aux-build:removing-extern-crate.rs
// run-rustfix
// compile-pass
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/removing-extern-crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// compile-flags: --edition 2018
// edition:2018
// aux-build:removing-extern-crate.rs
// run-rustfix
// compile-pass
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rust-2018/async-ident-allowed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// compile-flags: --edition 2015
// edition:2015

#![deny(rust_2018_compatibility)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// aux-build:edition-lint-paths.rs
// run-rustfix
// compile-flags:--edition 2018
// edition:2018

// The "normal case". Ideally we would remove the `extern crate` here,
// but we don't.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// aux-build:edition-lint-paths.rs
// run-rustfix
// compile-flags:--edition 2018
// edition:2018

// The "normal case". Ideally we would remove the `extern crate` here,
// but we don't.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rust-2018/issue-52202-use-suggestions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// compile-flags: --edition 2018
// edition:2018

// The local `use` suggestion should start with `crate::` (but the
// standard-library suggestions should not, obviously).
Expand Down

0 comments on commit 32e17b5

Please sign in to comment.