adjust test

This commit is contained in:
Young-Flash 2024-03-21 17:58:44 +08:00
parent 1c85234bcd
commit a89e417ce5

View file

@ -18,6 +18,7 @@ const HOVER_BASE_CONFIG: HoverConfig = HoverConfig {
format: HoverDocFormat::Markdown,
keywords: true,
max_trait_assoc_items_count: None,
max_struct_field_count: None,
};
fn check_hover_no_result(ra_fixture: &str) {
@ -853,9 +854,7 @@ struct Foo$0 { field: u32 }
```rust
// size = 4, align = 4
struct Foo {
field: u32,
}
struct Foo
```
"#]],
);
@ -873,11 +872,6 @@ struct Foo$0 where u32: Copy { field: u32 }
```rust
// size = 4, align = 4
struct Foo
where
u32: Copy,
{
field: u32,
}
```
"#]],
);
@ -1344,9 +1338,7 @@ impl Thing {
```
```rust
struct Thing {
x: u32,
}
struct Thing
```
"#]],
);
@ -1365,9 +1357,7 @@ impl Thing {
```
```rust
struct Thing {
x: u32,
}
struct Thing
```
"#]],
);
@ -2599,7 +2589,7 @@ fn main() { let s$0t = S{ f1:0 }; }
focus_range: 7..8,
name: "S",
kind: Struct,
description: "struct S {\n f1: u32,\n}",
description: "struct S",
},
},
],
@ -2645,7 +2635,7 @@ fn main() { let s$0t = S{ f1:Arg(0) }; }
focus_range: 24..25,
name: "S",
kind: Struct,
description: "struct S<T> {\n f1: T,\n}",
description: "struct S<T>",
},
},
],
@ -2704,7 +2694,7 @@ fn main() { let s$0t = S{ f1: S{ f1: Arg(0) } }; }
focus_range: 24..25,
name: "S",
kind: Struct,
description: "struct S<T> {\n f1: T,\n}",
description: "struct S<T>",
},
},
],
@ -2957,7 +2947,7 @@ fn main() { let s$0t = foo(); }
focus_range: 39..41,
name: "S1",
kind: Struct,
description: "struct S1 {}",
description: "struct S1",
},
},
HoverGotoTypeData {
@ -2970,7 +2960,7 @@ fn main() { let s$0t = foo(); }
focus_range: 52..54,
name: "S2",
kind: Struct,
description: "struct S2 {}",
description: "struct S2",
},
},
],
@ -3061,7 +3051,7 @@ fn foo(ar$0g: &impl Foo + Bar<S>) {}
focus_range: 36..37,
name: "S",
kind: Struct,
description: "struct S {}",
description: "struct S",
},
},
],
@ -3161,7 +3151,7 @@ fn foo(ar$0g: &impl Foo<S>) {}
focus_range: 23..24,
name: "S",
kind: Struct,
description: "struct S {}",
description: "struct S",
},
},
],
@ -3198,7 +3188,7 @@ fn main() { let s$0t = foo(); }
focus_range: 49..50,
name: "B",
kind: Struct,
description: "struct B<T> {}",
description: "struct B<T>",
},
},
HoverGotoTypeData {
@ -3287,7 +3277,7 @@ fn foo(ar$0g: &dyn Foo<S>) {}
focus_range: 23..24,
name: "S",
kind: Struct,
description: "struct S {}",
description: "struct S",
},
},
],
@ -3322,7 +3312,7 @@ fn foo(a$0rg: &impl ImplTrait<B<dyn DynTrait<B<S>>>>) {}
focus_range: 50..51,
name: "B",
kind: Struct,
description: "struct B<T> {}",
description: "struct B<T>",
},
},
HoverGotoTypeData {
@ -3361,7 +3351,7 @@ fn foo(a$0rg: &impl ImplTrait<B<dyn DynTrait<B<S>>>>) {}
focus_range: 65..66,
name: "S",
kind: Struct,
description: "struct S {}",
description: "struct S",
},
},
],