mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 18:57:19 +00:00

In order to expose edition dependent divergences in some tests in the test suite, add explicit `edition` annotations. Some of these tests might require additional work to *avoid* the divergences, as they might have been unintentional. These are not exhaustive changes, purely opportunistic while looking at something else.
11 lines
490 B
Rust
11 lines
490 B
Rust
//@revisions: edition2015 edition2024
|
|
//@[edition2015] edition:2015
|
|
//@[edition2024] edition:2024
|
|
fn dyn() -> &'static dyn use<> { &() }
|
|
//[edition2015]~^ ERROR expected one of `!`, `(`, `::`, `<`, `where`, or `{`, found keyword `use`
|
|
//[edition2024]~^^ ERROR expected identifier, found keyword `dyn`
|
|
//[edition2024]~| ERROR `use<...>` precise capturing syntax not allowed in `dyn` trait object bounds
|
|
//[edition2024]~| ERROR at least one trait is required for an object type
|
|
|
|
fn main() {}
|