Fix coerce_unsize_generic test

This commit is contained in:
Lukas Wirth 2024-02-14 13:35:43 +01:00
parent 4829f591fb
commit 0eca3ef93e

View File

@ -536,7 +536,7 @@ fn test() {
#[test]
fn coerce_unsize_generic() {
check(
check_no_mismatches(
r#"
//- minicore: coerce_unsized
struct Foo<T> { t: T };
@ -544,9 +544,7 @@ fn coerce_unsize_generic() {
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]>
}
"#,
);