replace //@ compile-flags: --edition with //@ edition

This commit is contained in:
Pietro Albini 2025-04-08 15:17:08 +02:00
parent 97c966bb40
commit cd371b90e2
No known key found for this signature in database
GPG Key ID: CD76B35F7734769E
108 changed files with 181 additions and 135 deletions

View File

@ -1,6 +1,7 @@
//@ only-linux
//@ assembly-output: emit-asm
//@ compile-flags: --crate-type=lib -Copt-level=3 --edition 2024
//@ compile-flags: --crate-type=lib -Copt-level=3
//@ edition: 2024
use std::ffi::CStr;

View File

@ -1,6 +1,7 @@
// Just make sure that async closures don't ICE.
//
//@ compile-flags: -C debuginfo=2 --edition=2018
//@ compile-flags: -C debuginfo=2
//@ edition: 2018
//@ ignore-msvc
// CHECK-DAG: [[GEN_FN:!.*]] = !DINamespace(name: "async_closure_test"

View File

@ -7,7 +7,8 @@
//@[MSVC] only-msvc
//@[NONMSVC] ignore-msvc
//@ compile-flags: -C debuginfo=2 --edition=2018 -Copt-level=0
//@ compile-flags: -C debuginfo=2 -Copt-level=0
//@ edition: 2018
#![crate_type = "lib"]

View File

@ -4,7 +4,8 @@
// - Other fields are not marked artificial
//
//
//@ compile-flags: -C debuginfo=2 --edition=2018
//@ compile-flags: -C debuginfo=2
//@ edition: 2018
//@ only-msvc
async fn foo() {}

View File

@ -4,7 +4,8 @@
// - Other fields are not marked artificial
//
//
//@ compile-flags: -C debuginfo=2 --edition=2018
//@ compile-flags: -C debuginfo=2
//@ edition: 2018
//@ ignore-msvc
async fn foo() {}
@ -22,26 +23,26 @@ async fn async_fn_test() {
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: discriminator: [[DISC:![0-9]*]]
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "0", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 11,
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 12,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "Unresumed", scope: [[GEN]],
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "1", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 15,
// CHECK-SAME: file: [[FILE]], line: 16,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "2", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 15,
// CHECK-SAME: file: [[FILE]], line: 16,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "3", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 12,
// CHECK-SAME: file: [[FILE]], line: 13,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "4", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 14,
// CHECK-SAME: file: [[FILE]], line: 15,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: [[S1:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Suspend1", scope: [[GEN]],

View File

@ -4,7 +4,8 @@
// - Other fields are not marked artificial
//
//
//@ compile-flags: -C debuginfo=2 --edition=2018
//@ compile-flags: -C debuginfo=2
//@ edition: 2018
//@ ignore-msvc
#![feature(coroutines, coroutine_trait)]
@ -27,26 +28,26 @@ fn coroutine_test() -> impl Coroutine<Yield = i32, Return = ()> {
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: discriminator: [[DISC:![0-9]*]]
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "0", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 15,
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 16,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "Unresumed", scope: [[GEN]],
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "1", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 19,
// CHECK-SAME: file: [[FILE]], line: 20,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "2", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 19,
// CHECK-SAME: file: [[FILE]], line: 20,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "3", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 16,
// CHECK-SAME: file: [[FILE]], line: 17,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "4", scope: [[VARIANT]],
// CHECK-SAME: file: [[FILE]], line: 18,
// CHECK-SAME: file: [[FILE]], line: 19,
// CHECK-NOT: flags: DIFlagArtificial
// CHECK-SAME: )
// CHECK: [[S1:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Suspend1", scope: [[GEN]],

View File

@ -18,7 +18,8 @@
// legacy mangling scheme rustc version and generic parameters are both hashed into a single part
// of the name, thus randomizing item order with respect to rustc version.
//@ compile-flags: -Cdebuginfo=2 --edition 2021 -Copt-level=0 -Csymbol-mangling-version=v0
//@ compile-flags: -Cdebuginfo=2 -Copt-level=0 -Csymbol-mangling-version=v0
//@ edition: 2021
// non_generic_closure()
// NONMSVC: !DICompositeType(tag: DW_TAG_structure_type, name: "{closure_env#0}", scope: ![[non_generic_closure_NAMESPACE:[0-9]+]],

View File

@ -1,4 +1,5 @@
//@ compile-flags: -C opt-level=z --edition=2021
//@ compile-flags: -C opt-level=z
//@ edition: 2021
#![crate_type = "lib"]

View File

@ -2,7 +2,8 @@
// gets inlined by MIR inlining. Without function argument indexes, `info args` in gdb won't show
// arguments and their values for the current function.
//@ compile-flags: -Zinline-mir=yes -Cdebuginfo=2 --edition=2021
//@ compile-flags: -Zinline-mir=yes -Cdebuginfo=2
//@ edition: 2021
#![crate_type = "lib"]
@ -14,9 +15,9 @@ pub fn outer_function(x: usize, y: usize) -> usize {
#[inline]
fn inner_function(aaaa: usize, bbbb: usize) -> usize {
// CHECK: !DILocalVariable(name: "aaaa", arg: 1
// CHECK-SAME: line: 15
// CHECK-SAME: line: 16
// CHECK-NOT: !DILexicalBlock(
// CHECK: !DILocalVariable(name: "bbbb", arg: 2
// CHECK-SAME: line: 15
// CHECK-SAME: line: 16
aaaa + bbbb
}

View File

@ -1,7 +1,8 @@
//! This test checks that compiler don't generate useless compares to zeros
//! for `NonZero` integer types.
//!
//@ compile-flags: -Copt-level=3 --edition=2021 -Zmerge-functions=disabled
//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
//@ edition: 2021
//@ only-64bit (because the LLVM type of i64 for usize shows up)
#![crate_type = "lib"]

View File

@ -1,5 +1,6 @@
//@ revisions: llvm mir-opt3
//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled --edition=2021
//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled
//@ edition: 2021
//@ only-x86_64
//@ [mir-opt3]compile-flags: -Zmir-opt-level=3
//@ [mir-opt3]build-pass

View File

@ -1,4 +1,5 @@
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled --edition=2021
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
//@ edition: 2021
//@ only-x86_64
//@ revisions: NINETEEN TWENTY
//@[NINETEEN] exact-llvm-major-version: 19

View File

@ -1,5 +1,5 @@
//@ known-bug: #119095
//@ compile-flags: --edition=2021
//@ edition: 2021
fn any<T>() -> T {
loop {}

View File

@ -1,5 +1,6 @@
//@ known-bug: #120016
//@ compile-flags: -Zcrate-attr=feature(const_async_blocks) --edition=2021
//@ compile-flags: -Zcrate-attr=feature(const_async_blocks)
//@ edition: 2021
#![feature(type_alias_impl_trait, const_async_blocks)]

View File

@ -1,5 +1,5 @@
//@ known-bug: #127033
//@ compile-flags: --edition=2021
//@ edition: 2021
pub trait RaftLogStorage {
fn save_vote(vote: ()) -> impl std::future::Future + Send;

View File

@ -1,5 +1,6 @@
//@ known-bug: rust-lang/rust#128094
//@ compile-flags: -Zmir-enable-passes=+GVN --edition=2018
//@ compile-flags: -Zmir-enable-passes=+GVN
//@ edition: 2018
pub enum Request {
TestSome(T),

View File

@ -1,5 +1,6 @@
//@ known-bug: #132103
//@compile-flags: -Zvalidate-mir --edition=2018 -Zinline-mir=yes
//@ compile-flags: -Zvalidate-mir -Zinline-mir=yes
//@ edition: 2018
use core::future::{async_drop_in_place, Future};
use core::mem::{self};
use core::pin::pin;

View File

@ -1,6 +1,7 @@
//@ known-bug: #132430
//@compile-flags: --edition=2018 --crate-type=lib
//@ compile-flags: --crate-type=lib
//@ edition: 2018
#![feature(cmse_nonsecure_entry)]
struct Test;

View File

@ -1,5 +1,6 @@
//@ known-bug: #135128
//@ compile-flags: -Copt-level=1 --edition=2021
//@ compile-flags: -Copt-level=1
//@ edition: 2021
#![feature(trivial_bounds)]

View File

@ -1,5 +1,6 @@
//@ known-bug: #135470
//@ compile-flags: --edition=2021 -Copt-level=0
//@ compile-flags: -Copt-level=0
//@ edition: 2021
use std::future::Future;
trait Access {

View File

@ -1,5 +1,7 @@
//@ known-bug: #135646
//@ compile-flags: --edition=2024 -Zpolonius=next
//@ compile-flags: -Zpolonius=next
//@ edition: 2024
fn main() {
&{ [1, 2, 3][4] };
}

View File

@ -1,5 +1,5 @@
//@ known-bug: #135668
//@ compile-flags: --edition=2021
//@ edition: 2021
use std::future::Future;
pub async fn foo() {

View File

@ -1,5 +1,5 @@
//@ known-bug: #137467
//@ compile-flags: --edition=2021
//@ edition: 2021
enum Camera {
Normal { base_transform: i32 },
Volume { transform: i32 },

View File

@ -1,5 +1,5 @@
//@ known-bug: #137467
//@ compile-flags: --edition=2021
//@ edition: 2021
enum Camera {
Normal { base_transform: i32 },

View File

@ -1,5 +1,5 @@
//@ known-bug: #137467
//@ compile-flags: --edition=2021
//@ edition: 2021
fn meow(x: (u32, u32, u32)) {
let f = || {

View File

@ -1,5 +1,5 @@
//@ known-bug: #137916
//@ compile-flags: --edition=2021
//@ edition: 2021
use std::ptr::null;
async fn a() -> Box<dyn Send> {

View File

@ -1,6 +1,7 @@
#![feature(async_closure)]
//@ only-cdb
//@ compile-flags:-g --edition=2021
//@ compile-flags: -g
//@ edition: 2021
// === CDB TESTS ==================================================================================

View File

@ -1,6 +1,7 @@
//@ revisions:cfail1 cfail2
//@[cfail1] compile-flags: --crate-type=lib --edition=2021 -Zassert-incr-state=not-loaded
//@[cfail2] compile-flags: --crate-type=lib --edition=2021 -Zassert-incr-state=loaded
//@[cfail1] compile-flags: --crate-type=lib -Zassert-incr-state=not-loaded
//@[cfail2] compile-flags: --crate-type=lib -Zassert-incr-state=loaded
//@ edition: 2021
//@ build-pass
use core::any::Any;

View File

@ -1,7 +1,8 @@
// FIXME: if/when the output of the test harness can be tested on its own, this test should be
// adapted to use that, and that normalize line can go away
//@ compile-flags:--test --edition 2021
//@ compile-flags: --test
//@ edition: 2021
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101

View File

@ -1,14 +1,14 @@
running 1 test
test $DIR/failed-doctest-should-panic-2021.rs - Foo (line 9) ... FAILED
test $DIR/failed-doctest-should-panic-2021.rs - Foo (line 10) ... FAILED
failures:
---- $DIR/failed-doctest-should-panic-2021.rs - Foo (line 9) stdout ----
---- $DIR/failed-doctest-should-panic-2021.rs - Foo (line 10) stdout ----
Test executable succeeded, but it's marked `should_panic`.
failures:
$DIR/failed-doctest-should-panic-2021.rs - Foo (line 9)
$DIR/failed-doctest-should-panic-2021.rs - Foo (line 10)
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME

View File

@ -3,7 +3,8 @@
//@ check-pass
//@ aux-build: inner-crate-doc.rs
//@ compile-flags: --extern inner_crate_doc --edition 2018
//@ compile-flags: --extern inner_crate_doc
//@ edition: 2018
/// Import doc comment [inner_crate_doc]
#[doc(inline)]

View File

@ -1,4 +1,5 @@
//@ compile-flags: --crate-type lib --edition 2018
//@ compile-flags: --crate-type lib
//@ edition: 2018
#![feature(rustc_attrs)]
#![feature(no_core)]

View File

@ -1,4 +1,5 @@
//@ compile-flags: --emit metadata --crate-type lib --edition 2018
//@ compile-flags: --emit metadata --crate-type lib
//@ edition: 2018
#![crate_name = "foo"]

View File

@ -6,7 +6,8 @@
//@ aux-build:empty2.rs
//@ aux-crate:priv:empty2=empty2.rs
//@ build-aux-docs
//@ compile-flags:-Z unstable-options --edition 2018
//@ compile-flags:-Z unstable-options
//@ edition: 2018
//@ has extern_crate_only_used_in_link/index.html
//@ has - '//a[@href="../issue_66159_1/struct.Something.html"]' 'issue_66159_1::Something'

View File

@ -1,5 +1,6 @@
//@ aux-build: primitive-reexport.rs
//@ compile-flags:--extern foo --edition 2018
//@ compile-flags: --extern foo
//@ edition: 2018
#![crate_name = "bar"]

View File

@ -1,4 +1,5 @@
//@ compile-flags: --crate-type lib --edition 2018
//@ compile-flags: --crate-type lib
//@ edition: 2018
#![crate_name = "foo"]
#![feature(rustc_attrs)]

View File

@ -1,4 +1,5 @@
//@ compile-flags: --crate-type lib --edition 2018
//@ compile-flags: --crate-type lib
//@ edition: 2018
#![crate_name = "foo"]
#![feature(rustc_attrs)]

View File

@ -1,4 +1,5 @@
//@ compile-flags: --crate-type lib --edition 2018
//@ compile-flags: --crate-type lib
//@ edition: 2018
#![crate_name = "foo"]
#![feature(rustdoc_internals)]

View File

@ -1,4 +1,5 @@
//@ compile-flags: --crate-type lib --edition 2018
//@ compile-flags: --crate-type lib
//@ edition: 2018
#![crate_name = "foo"]
#![feature(rustc_attrs)]

View File

@ -1,4 +1,5 @@
//@ compile-flags: -Zvalidate-mir --edition=2018 --crate-type=lib -Copt-level=3
//@ compile-flags: -Zvalidate-mir --crate-type=lib -Copt-level=3
//@ edition: 2018
fn main() {}

View File

@ -1,5 +1,5 @@
error[E0507]: cannot move out of `x` which is behind a mutable reference
--> $DIR/closure-shim-borrowck-error.rs:10:18
--> $DIR/closure-shim-borrowck-error.rs:11:18
|
LL | needs_fn_mut(async || {
| ^^^^^^^^ `x` is moved here
@ -11,7 +11,7 @@ LL | x.hello();
| move occurs because `x` has type `Ty`, which does not implement the `Copy` trait
|
note: if `Ty` implemented `Clone`, you could clone the value
--> $DIR/closure-shim-borrowck-error.rs:16:1
--> $DIR/closure-shim-borrowck-error.rs:17:1
|
LL | x.hello();
| - you could clone this value

View File

@ -1,6 +1,7 @@
// This used to compile the future down to ud2, due to uninhabited types being
// handled incorrectly in coroutines.
//@ compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018
//@ compile-flags: -Copt-level=z -Cdebuginfo=2
//@ edition: 2018
//@ run-pass

View File

@ -4,7 +4,8 @@
//@ run-pass
//@ compile-flags: --edition=2018 -Aunused
//@ compile-flags: -Aunused
//@ edition: 2018
pub enum Uninhabited { }

View File

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition name: `tru`
--> $DIR/raw-keywords.rs:14:7
--> $DIR/raw-keywords.rs:15:7
|
LL | #[cfg(tru)]
| ^^^ help: there is a config with a similar name: `r#true`
@ -9,7 +9,7 @@ LL | #[cfg(tru)]
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `r#false`
--> $DIR/raw-keywords.rs:19:7
--> $DIR/raw-keywords.rs:20:7
|
LL | #[cfg(r#false)]
| ^^^^^^^
@ -19,7 +19,7 @@ LL | #[cfg(r#false)]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `await`
--> $DIR/raw-keywords.rs:27:29
--> $DIR/raw-keywords.rs:28:29
|
LL | #[cfg_attr(edition2015, cfg(await))]
| ^^^^^
@ -28,7 +28,7 @@ LL | #[cfg_attr(edition2015, cfg(await))]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `raw`
--> $DIR/raw-keywords.rs:33:7
--> $DIR/raw-keywords.rs:34:7
|
LL | #[cfg(r#raw)]
| ^^^^^

View File

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition name: `tru`
--> $DIR/raw-keywords.rs:14:7
--> $DIR/raw-keywords.rs:15:7
|
LL | #[cfg(tru)]
| ^^^ help: there is a config with a similar name: `r#true`
@ -9,7 +9,7 @@ LL | #[cfg(tru)]
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `r#false`
--> $DIR/raw-keywords.rs:19:7
--> $DIR/raw-keywords.rs:20:7
|
LL | #[cfg(r#false)]
| ^^^^^^^
@ -19,7 +19,7 @@ LL | #[cfg(r#false)]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `r#await`
--> $DIR/raw-keywords.rs:28:29
--> $DIR/raw-keywords.rs:29:29
|
LL | #[cfg_attr(edition2021, cfg(r#await))]
| ^^^^^^^
@ -28,7 +28,7 @@ LL | #[cfg_attr(edition2021, cfg(r#await))]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `raw`
--> $DIR/raw-keywords.rs:33:7
--> $DIR/raw-keywords.rs:34:7
|
LL | #[cfg(r#raw)]
| ^^^^^

View File

@ -6,7 +6,8 @@
//@ compile-flags: --cfg=true --cfg=async --check-cfg=cfg(r#true,r#async,edition2015,edition2021)
//
//@ revisions: edition2015 edition2021
//@ [edition2021] compile-flags: --edition 2021
//@ [edition2015] edition: 2015
//@ [edition2021] edition: 2021
#[cfg(r#true)]
fn foo() {}

View File

@ -2,8 +2,8 @@
//
//@ check-pass
//@ revisions: twenty_eighteen twenty_twentyone
//@ [twenty_eighteen]compile-flags: --edition 2018
//@ [twenty_twentyone]compile-flags: --edition 2021
//@ [twenty_eighteen] edition: 2018
//@ [twenty_twentyone] edition: 2021
struct S<'a>(Option<&'a mut i32>);

View File

@ -1,8 +1,8 @@
//@ run-pass
//@ check-run-results
//@ revisions: twenty_eighteen twenty_twentyone
//@ [twenty_eighteen]compile-flags: --edition 2018
//@ [twenty_twentyone]compile-flags: --edition 2021
//@ [twenty_eighteen] edition: 2018
//@ [twenty_twentyone] edition: 2021
#[derive(Debug)]
struct Dropable(&'static str);

View File

@ -1,6 +1,6 @@
//@ revisions: edition2015 edition2021
//@ [edition2015]compile-flags: --edition=2015
//@ [edition2021]compile-flags: --edition=2021
//@ [edition2015] edition: 2015
//@ [edition2021] edition: 2021
#![feature(extern_types)]
#![feature(cfg_accessible)]

View File

@ -1,4 +1,4 @@
//@compile-flags: --edition 2018
//@ edition: 2018
use std::cell::Cell;
const WRITE: () = unsafe {

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![unstable(feature = "humans",
reason = "who ever let humans program computers,
we're apparently really bad at it",

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2024
//@ edition: 2024
//@ check-pass
#![feature(async_iterator, gen_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2024
//@ edition: 2024
//@ check-pass
#![feature(async_iterator, gen_blocks)]

View File

@ -1,5 +1,6 @@
//@ run-pass
//@ compile-flags: --edition 2021 -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3
//@ compile-flags: -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3
//@ edition: 2021
fn main() {
TranslatorI.visit_pre();

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
fn foo() -> Result<(), ()> {
Ok(try!()); //~ ERROR use of deprecated `try` macro
Ok(try!(Ok(()))) //~ ERROR use of deprecated `try` macro

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
pub fn main() {
let try_result: Option<_> = try { //~ ERROR `try` expression is experimental

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2021
//@ edition: 2021
pub fn demo() -> Option<i32> {
#[cfg(FALSE)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
pub fn demo() -> Option<i32> {
do yeet //~ ERROR `do yeet` expression is experimental

View File

@ -1,5 +1,6 @@
//@ check-pass
//@ compile-flags: --edition=2021 --crate-type=lib
//@ compile-flags: --crate-type=lib
//@ edition: 2021
use std::{
future::Future,

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition=2021
//@ edition: 2021
use std::future::Future;

View File

@ -5,7 +5,8 @@
// See also the discussion in <https://github.com/rust-lang/rust/pull/122954>.
//@ compile-flags: --extern aux_issue_121915 --edition 2018
//@ compile-flags: --extern aux_issue_121915
//@ edition: 2018
//@ aux-build: aux-issue-121915.rs
#[deny(redundant_imports)]

View File

@ -1,11 +1,11 @@
error: the item `aux_issue_121915` is imported redundantly
--> $DIR/redundant-import-extern-prelude.rs:14:9
--> $DIR/redundant-import-extern-prelude.rs:15:9
|
LL | use aux_issue_121915;
| ^^^^^^^^^^^^^^^^ the item `aux_issue_121915` is already defined by the extern prelude
|
note: the lint level is defined here
--> $DIR/redundant-import-extern-prelude.rs:11:8
--> $DIR/redundant-import-extern-prelude.rs:12:8
|
LL | #[deny(redundant_imports)]
| ^^^^^^^^^^^^^^^^^

View File

@ -1,4 +1,5 @@
//@ compile-flags: --extern aux_issue_121915 --edition 2015
//@ compile-flags: --extern aux_issue_121915
//@ edition: 2015
//@ aux-build: aux-issue-121915.rs
extern crate aux_issue_121915;

View File

@ -1,5 +1,5 @@
error: the item `aux_issue_121915` is imported redundantly
--> $DIR/redundant-import-issue-121915-2015.rs:8:9
--> $DIR/redundant-import-issue-121915-2015.rs:9:9
|
LL | extern crate aux_issue_121915;
| ------------------------------ the item `aux_issue_121915` is already imported here
@ -8,7 +8,7 @@ LL | use aux_issue_121915;
| ^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/redundant-import-issue-121915-2015.rs:6:8
--> $DIR/redundant-import-issue-121915-2015.rs:7:8
|
LL | #[deny(redundant_imports)]
| ^^^^^^^^^^^^^^^^^

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2021
//@ edition: 2021
#![deny(unused_imports, redundant_imports)]
#![allow(dead_code)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]
//@ run-pass

View File

@ -1,6 +1,7 @@
// issue #102317
//@ build-pass
//@ compile-flags: --edition 2021 -C opt-level=3 -Zvalidate-mir
//@ compile-flags: -C opt-level=3 -Zvalidate-mir
//@ edition: 2021
struct SegmentJob;

View File

@ -1,5 +1,5 @@
//@ build-pass
//@ compile-flags: --edition 2018
//@ edition: 2018
//@ compile-flags: --crate-type rlib
use std::future::Future;

View File

@ -1,5 +1,5 @@
//@ build-pass
//@ compile-flags: --edition 2018
//@ edition: 2018
//@ compile-flags: --crate-type rlib
use std::future::Future;

View File

@ -1,4 +1,4 @@
//@compile-flags: --edition 2018
//@ edition: 2018
#![feature(unqualified_local_imports)]
#![deny(unqualified_local_imports)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition=2018
//@ edition: 2018
//@ run-pass
macro_rules! regex {

View File

@ -1,6 +1,6 @@
//@ run-rustfix
//@ check-pass
//@ compile-flags: --edition=2021
//@ edition: 2021
#![warn(edition_2024_expr_fragment_specifier)]
macro_rules! m {

View File

@ -1,6 +1,6 @@
//@ run-rustfix
//@ check-pass
//@ compile-flags: --edition=2021
//@ edition: 2021
#![warn(edition_2024_expr_fragment_specifier)]
macro_rules! m {

View File

@ -1,7 +1,8 @@
// Non-regression test ICE from issue #105809 and duplicates.
//@ build-pass: the ICE is during codegen
//@ compile-flags: --edition 2018 -Zmir-opt-level=1
//@ compile-flags: -Zmir-opt-level=1
//@ edition: 2018
use std::{future::Future, pin::Pin};

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
fn main() {
let try = "foo"; //~ error: expected identifier, found reserved keyword `try`

View File

@ -2,7 +2,8 @@
// trait object type to fail, causing an ICE.
//
//@ needs-sanitizer-cfi
//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi --edition=2021
//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi
//@ edition: 2021
//@ no-prefer-dynamic
//@ only-x86_64-unknown-linux-gnu
//@ build-pass

View File

@ -2,7 +2,8 @@
// encode_ty and caused the compiler to ICE.
//
//@ needs-sanitizer-cfi
//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi --edition=2021
//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi
//@ edition: 2021
//@ no-prefer-dynamic
//@ only-x86_64-unknown-linux-gnu
//@ build-pass

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition=2021
//@ edition: 2021
//@ run-rustfix
#![allow(unused)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition=2021
//@ edition: 2021
//@ run-rustfix
#![allow(unused)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition=2021
//@ edition: 2021
//@ run-rustfix
pub struct Struct<T> {

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition=2021
//@ edition: 2021
//@ run-rustfix
pub struct Struct<T> {

View File

@ -1,7 +1,7 @@
// Regression test for #86667, where a garbled suggestion was issued for
// a missing named lifetime parameter.
//@ compile-flags: --edition 2018
//@ edition: 2018
async fn a(s1: &str, s2: &str) -> &str {
//~^ ERROR: missing lifetime specifier [E0106]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition=2021
//@ edition: 2021
#![feature(rustc_attrs)]

View File

@ -1,7 +1,8 @@
// Regression test for #132335. This previously ICE'd due to ambiguity
// in MIR typeck.
//@ compile-flags: -Znext-solver=globally --crate-type lib --edition=2018
//@ compile-flags: -Znext-solver=globally --crate-type lib
//@ edition: 2018
//@ check-pass
use core::future::Future;
use core::pin::Pin;

View File

@ -3,7 +3,7 @@
// of the async block. This caused borrowck of the recursive
// call to ICE.
//@ compile-flags: --edition=2021
//@ edition: 2021
//@ check-pass
async fn test() {
Box::pin(test()).await;

View File

@ -1,4 +1,4 @@
//@compile-flags: --edition 2021
//@ edition: 2021
fn f<'a>(x: Box<dyn Fn() -> Option<usize + 'a>>) -> usize {
//~^ ERROR expected trait, found builtin type `usize`

View File

@ -1,6 +1,6 @@
//@ run-pass
#![allow(unreachable_code)]
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2015
//@ edition: 2015
pub fn main() {
let try_result: Option<_> = try {

View File

@ -1,5 +1,5 @@
//@ check-pass
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,5 +1,5 @@
//@ run-pass
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,5 +1,5 @@
//@ run-pass
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition 2018
//@ edition: 2018
#![feature(try_blocks)]

View File

@ -1,6 +1,6 @@
// Test unreachable_code lint for `try {}` block ok-wrapping. See issues #54165, #63324.
//@ compile-flags: --edition 2018
//@ edition: 2018
//@ check-pass
#![feature(try_blocks)]
#![warn(unreachable_code)]

View File

@ -1,5 +1,5 @@
//@ check-pass
//@ compile-flags: --edition 2018
//@ edition: 2018
//@ run-rustfix
#![feature(try_blocks)]

Some files were not shown because too many files have changed in this diff Show More