]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr
Remove E0308 note when primary label has all info
[rust.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 |     let _: &'static str = x;
5    |                           ^ expected &str, found opaque type
6    |
7    = note: expected reference `&'static str`
8             found opaque type `NoReveal`
9
10 error[E0605]: non-primitive cast: `NoReveal` as `&'static str`
11   --> $DIR/never_reveal_concrete_type.rs:14:13
12    |
13 LL |     let _ = x as &'static str;
14    |             ^^^^^^^^^^^^^^^^^
15    |
16    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
17
18 error: aborting due to 2 previous errors
19
20 Some errors have detailed explanations: E0308, E0605.
21 For more information about an error, try `rustc --explain E0308`.