]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/unnameable_type.stderr
Rollup merge of #106732 - durin42:dmitrig-arrayref-ctor, r=nikic
[rust.git] / tests / ui / type-alias-impl-trait / unnameable_type.stderr
1 error: unconstrained opaque type
2   --> $DIR/unnameable_type.rs:17:18
3    |
4 LL | type MyPrivate = impl Sized;
5    |                  ^^^^^^^^^^
6    |
7    = note: `MyPrivate` must be used in combination with a concrete type within the same module
8
9 error[E0053]: method `dont_define_this` has an incompatible type for trait
10   --> $DIR/unnameable_type.rs:20:35
11    |
12 LL | type MyPrivate = impl Sized;
13    |                  ---------- the found opaque type
14 ...
15 LL |     fn dont_define_this(_private: MyPrivate) {}
16    |                                   ^^^^^^^^^
17    |                                   |
18    |                                   expected struct `Private`, found opaque type
19    |                                   help: change the parameter type to match the trait: `Private`
20    |
21 note: type in trait
22   --> $DIR/unnameable_type.rs:10:39
23    |
24 LL |         fn dont_define_this(_private: Private) {}
25    |                                       ^^^^^^^
26    = note: expected signature `fn(Private)`
27               found signature `fn(MyPrivate)`
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0053`.