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