]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.stderr
unboxed-closures and type-alias-impl-trait nll revisions
[rust.git] / src / test / ui / type-alias-impl-trait / declared_but_not_defined_in_scope.stderr
1 error: unconstrained opaque type
2   --> $DIR/declared_but_not_defined_in_scope.rs:7:20
3    |
4 LL |     pub type Boo = impl ::std::fmt::Debug;
5    |                    ^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `Boo` must be used in combination with a concrete type within the same module
8
9 error[E0308]: mismatched types
10   --> $DIR/declared_but_not_defined_in_scope.rs:11:5
11    |
12 LL |     pub type Boo = impl ::std::fmt::Debug;
13    |                    ---------------------- the expected opaque type
14 ...
15 LL | fn bomp() -> boo::Boo {
16    |              -------- expected `Boo` because of return type
17 LL |     ""
18    |     ^^ expected opaque type, found `&str`
19    |
20    = note: expected opaque type `Boo`
21                 found reference `&'static str`
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0308`.