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