mirror of https://github.com/rust-lang/rust
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/clarify-error-for-generics-with-default-issue-120785.rs:6:9
|
|
|
|
|
LL | let mut b: What<usize> = What(5, vec![1, 2, 3]);
|
|
| ----------- expected due to this type
|
|
LL | let c: What<usize, String> = What(1, String::from("meow"));
|
|
LL | b = c;
|
|
| ^ expected `What`, found `What<usize, String>`
|
|
|
|
|
= note: expected struct `What<_, Vec<usize>>`
|
|
found struct `What<_, String>`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/clarify-error-for-generics-with-default-issue-120785.rs:10:9
|
|
|
|
|
LL | let mut f: What<usize, Vec<String>> = What(1, vec![String::from("meow")]);
|
|
| ------------------------ expected due to this type
|
|
LL | let e: What<usize> = What(5, vec![1, 2, 3]);
|
|
LL | f = e;
|
|
| ^ expected `What<usize, Vec<String>>`, found `What`
|
|
|
|
|
= note: expected struct `What<_, Vec<String>>`
|
|
found struct `What<_, Vec<usize>>`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|