about summary refs log tree commit diff
path: root/tests/ui/impl-trait/precise-capturing/dyn-use.edition2024.stderr
blob: cb3fe4cb5836a100d322a25ae06ee10da3894c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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`.