rust/tests/ui/impl-trait/precise-capturing/dyn-use.edition2024.stderr
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

27 lines
768 B
Plaintext

error: expected identifier, found keyword `dyn`
--> $DIR/dyn-use.rs:4:4
|
LL | fn dyn() -> &'static dyn use<> { &() }
| ^^^ expected identifier, found keyword
|
help: escape `dyn` to use it as an identifier
|
LL | fn r#dyn() -> &'static dyn use<> { &() }
| ++
error: `use<...>` precise capturing syntax not allowed in `dyn` trait object bounds
--> $DIR/dyn-use.rs:4:26
|
LL | fn dyn() -> &'static dyn use<> { &() }
| ^^^^^
error[E0224]: at least one trait is required for an object type
--> $DIR/dyn-use.rs:4:22
|
LL | fn dyn() -> &'static dyn use<> { &() }
| ^^^^^^^^^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0224`.