]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / no_revealing_outside_defining_module.stderr
1 error[E0308]: mismatched types
2   --> $DIR/no_revealing_outside_defining_module.rs:15:19
3    |
4 LL |     pub type Boo = impl ::std::fmt::Debug;
5    |                    ---------------------- the found opaque type
6 ...
7 LL |     let _: &str = bomp();
8    |            ----   ^^^^^^ expected `&str`, found opaque type
9    |            |
10    |            expected due to this
11    |
12    = note: expected reference `&str`
13             found opaque type `Boo`
14
15 error[E0308]: mismatched types
16   --> $DIR/no_revealing_outside_defining_module.rs:19:5
17    |
18 LL |     pub type Boo = impl ::std::fmt::Debug;
19    |                    ---------------------- the expected opaque type
20 ...
21 LL | fn bomp() -> boo::Boo {
22    |              -------- expected `Boo` because of return type
23 LL |     ""
24    |     ^^ expected opaque type, found `&str`
25    |
26    = note: expected opaque type `Boo`
27                 found reference `&'static str`
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0308`.