Esteban Küber 8c3a033d7f Add edition checks for some tests that had divergent output
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.
2025-06-25 17:02:26 +00:00

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() {}