Update item order in test

This commit is contained in:
Veera 2024-02-23 13:22:14 -05:00
parent 3ba50b36e7
commit cc13f8278f
2 changed files with 10 additions and 10 deletions

View File

@ -5,7 +5,7 @@ fn main() {
let c: What<usize, String> = What(1, String::from("meow"));
b = c; //~ ERROR mismatched types
let mut e: What<usize> = What(5, vec![1, 2, 3]);
let f: What<usize, Vec<String>> = What(1, vec![String::from("meow")]);
e = f; //~ ERROR mismatched types
let mut f: What<usize, Vec<String>> = What(1, vec![String::from("meow")]);
let e: What<usize> = What(5, vec![1, 2, 3]);
f = e; //~ ERROR mismatched types
}

View File

@ -13,14 +13,14 @@ LL | b = c;
error[E0308]: mismatched types
--> $DIR/clarify-error-for-generics-with-default-issue-120785.rs:10:9
|
LL | let mut e: What<usize> = What(5, vec![1, 2, 3]);
| ----------- expected due to this type
LL | let f: What<usize, Vec<String>> = What(1, vec![String::from("meow")]);
LL | e = f;
| ^ expected `What`, found `What<usize, Vec<String>>`
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<usize>>`
found struct `What<_, Vec<String>>`
= note: expected struct `What<_, Vec<String>>`
found struct `What<_, Vec<usize>>`
error: aborting due to 2 previous errors