]> git.lizzy.rs Git - rust.git/blob - src/test/ui/existential_types/never_reveal_concrete_type.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / existential_types / never_reveal_concrete_type.stderr
1 error[E0308]: mismatched types
2   --> $DIR/never_reveal_concrete_type.rs:24:27
3    |
4 LL |     let _: &'static str = x; //~ mismatched types
5    |                           ^ expected reference, found opaque type
6    |
7    = note: expected type `&'static str`
8               found type `NoReveal`
9
10 error[E0605]: non-primitive cast: `NoReveal` as `&'static str`
11   --> $DIR/never_reveal_concrete_type.rs:25:13
12    |
13 LL |     let _ = x as &'static str; //~ non-primitive cast
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 occurred: E0308, E0605.
21 For more information about an error, try `rustc --explain E0308`.