Skip to content

Commit

Permalink
Fix coerce_unsize_generic test
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Feb 14, 2024
1 parent 4829f59 commit 0eca3ef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/hir-ty/src/tests/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,17 +536,15 @@ fn test() {

#[test]
fn coerce_unsize_generic() {
check(
check_no_mismatches(
r#"
//- minicore: coerce_unsized
struct Foo<T> { t: T };
struct Bar<T>(Foo<T>);
fn test() {
let _: &Foo<[usize]> = &Foo { t: [1, 2, 3] };
//^^^^^^^^^^^^^^^^^^^^^ expected &Foo<[usize]>, got &Foo<[i32; 3]>
let _: &Bar<[usize]> = &Bar(Foo { t: [1, 2, 3] });
//^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &Bar<[usize]>, got &Bar<[i32; 3]>
}
"#,
);
Expand Down

0 comments on commit 0eca3ef

Please sign in to comment.