mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Fix coerce_unsize_generic test
This commit is contained in:
parent
4829f591fb
commit
0eca3ef93e
1 changed files with 1 additions and 3 deletions
|
@ -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 @@ struct Bar<T>(Foo<T>);
|
||||||
|
|
||||||
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]>
|
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue