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] #[test]
fn coerce_unsize_generic() { fn coerce_unsize_generic() {
check( check_no_mismatches(
r#" r#"
//- minicore: coerce_unsized //- minicore: coerce_unsized
struct Foo<T> { t: T }; struct Foo<T> { t: T };
@ -544,9 +544,7 @@ fn coerce_unsize_generic() {
fn test() { fn test() {
let _: &Foo<[usize]> = &Foo { t: [1, 2, 3] }; let _: &Foo<[usize]> = &Foo { t: [1, 2, 3] };
//^^^^^^^^^^^^^^^^^^^^^ expected &Foo<[usize]>, got &Foo<[i32; 3]>
let _: &Bar<[usize]> = &Bar(Foo { t: [1, 2, 3] }); let _: &Bar<[usize]> = &Bar(Foo { t: [1, 2, 3] });
//^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &Bar<[usize]>, got &Bar<[i32; 3]>
} }
"#, "#,
); );