]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr
Update (un)suspicious files
[rustc.git] / src / test / ui / type-alias-impl-trait / never_reveal_concrete_type.stderr
1 error[E0308]: mismatched types
2 --> $DIR/never_reveal_concrete_type.rs:13:27
3 |
4 LL | type NoReveal = impl std::fmt::Debug;
5 | -------------------- the found opaque type
6 ...
7 LL | let _: &'static str = x;
8 | ------------ ^ expected `&str`, found opaque type
9 | |
10 | expected due to this
11 |
12 = note: expected reference `&'static str`
13 found opaque type `impl Debug`
14
15 error[E0605]: non-primitive cast: `impl Debug` as `&'static str`
16 --> $DIR/never_reveal_concrete_type.rs:14:13
17 |
18 LL | let _ = x as &'static str;
19 | ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
20
21 error: aborting due to 2 previous errors
22
23 Some errors have detailed explanations: E0308, E0605.
24 For more information about an error, try `rustc --explain E0308`.