Skip to content

Commit

Permalink
Update item order in test
Browse files Browse the repository at this point in the history
  • Loading branch information
veera-sivarajan committed Feb 23, 2024
1 parent 97e00a7 commit 3927057
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3927057

Please sign in to comment.