mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
tests: prefer edition: directives to compile-flags:--edition.
This commit is contained in:
parent
2c4402638e
commit
32e17b5921
@ -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)]
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)]
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
// revisions: zflag edition
|
||||
// [zflag]compile-flags: -Z borrowck=migrate
|
||||
// [edition]compile-flags: --edition 2018
|
||||
// [edition]edition:2018
|
||||
|
||||
#![feature(nll)]
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)]
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// run-rustfix
|
||||
// compile-flags: --edition 2018
|
||||
// edition:2018
|
||||
|
||||
#![allow(unused)]
|
||||
#![deny(elided_lifetimes_in_paths)]
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// run-rustfix
|
||||
// compile-flags: --edition 2018
|
||||
// edition:2018
|
||||
|
||||
#![allow(unused)]
|
||||
#![deny(elided_lifetimes_in_paths)]
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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 `+`
|
||||
|
@ -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)]
|
||||
|
@ -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)?) => {}
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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).
|
||||
|
Loading…
Reference in New Issue
Block a user