mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
the note for an uninferable hidden type now points at the opaque definition, unless the error already points inside it
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
error[E0282]: type annotations needed for `(_,)`
|
|
--> $DIR/recursive-in-exhaustiveness.rs:19:9
|
|
|
|
|
LL | let (x,) = (build(x),);
|
|
| ^^^^
|
|
|
|
|
note: cannot infer type of hidden type of opaque
|
|
--> $DIR/recursive-in-exhaustiveness.rs:17:22
|
|
|
|
|
LL | fn build<T>(x: T) -> impl Sized {
|
|
| ^^^^^^^^^^
|
|
help: consider giving this pattern a type, where the placeholder `_` is specified
|
|
|
|
|
LL | let (x,): (_,) = (build(x),);
|
|
| ++++++
|
|
|
|
error[E0282]: type annotations needed for `((_,),)`
|
|
--> $DIR/recursive-in-exhaustiveness.rs:29:9
|
|
|
|
|
LL | let (x,) = (build2(x),);
|
|
| ^^^^
|
|
|
|
|
note: cannot infer type of hidden type of opaque
|
|
--> $DIR/recursive-in-exhaustiveness.rs:27:23
|
|
|
|
|
LL | fn build2<T>(x: T) -> impl Sized {
|
|
| ^^^^^^^^^^
|
|
help: consider giving this pattern a type, where the placeholder `_` is specified
|
|
|
|
|
LL | let (x,): ((_,),) = (build2(x),);
|
|
| +++++++++
|
|
|
|
error[E0282]: type annotations needed
|
|
--> $DIR/recursive-in-exhaustiveness.rs:37:23
|
|
|
|
|
LL | fn build3<T>(x: T) -> impl Sized {
|
|
| ^^^^^^^^^^ cannot infer type
|
|
|
|
|
= note: cannot infer type of hidden type of opaque
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0282`.
|