Skip to content

Commit 063c8ab

Browse files
committed
adjust test
1 parent 50378ec commit 063c8ab

File tree

1 file changed

+15
-25
lines changed

1 file changed

+15
-25
lines changed

crates/ide/src/hover/tests.rs

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const HOVER_BASE_CONFIG: HoverConfig = HoverConfig {
1818
format: HoverDocFormat::Markdown,
1919
keywords: true,
2020
max_trait_assoc_items_count: None,
21+
max_struct_field_count: None,
2122
};
2223

2324
fn check_hover_no_result(ra_fixture: &str) {
@@ -853,9 +854,7 @@ struct Foo$0 { field: u32 }
853854
854855
```rust
855856
// size = 4, align = 4
856-
struct Foo {
857-
field: u32,
858-
}
857+
struct Foo
859858
```
860859
"#]],
861860
);
@@ -873,11 +872,6 @@ struct Foo$0 where u32: Copy { field: u32 }
873872
```rust
874873
// size = 4, align = 4
875874
struct Foo
876-
where
877-
u32: Copy,
878-
{
879-
field: u32,
880-
}
881875
```
882876
"#]],
883877
);
@@ -1344,9 +1338,7 @@ impl Thing {
13441338
```
13451339
13461340
```rust
1347-
struct Thing {
1348-
x: u32,
1349-
}
1341+
struct Thing
13501342
```
13511343
"#]],
13521344
);
@@ -1365,9 +1357,7 @@ impl Thing {
13651357
```
13661358
13671359
```rust
1368-
struct Thing {
1369-
x: u32,
1370-
}
1360+
struct Thing
13711361
```
13721362
"#]],
13731363
);
@@ -2599,7 +2589,7 @@ fn main() { let s$0t = S{ f1:0 }; }
25992589
focus_range: 7..8,
26002590
name: "S",
26012591
kind: Struct,
2602-
description: "struct S {\n f1: u32,\n}",
2592+
description: "struct S",
26032593
},
26042594
},
26052595
],
@@ -2645,7 +2635,7 @@ fn main() { let s$0t = S{ f1:Arg(0) }; }
26452635
focus_range: 24..25,
26462636
name: "S",
26472637
kind: Struct,
2648-
description: "struct S<T> {\n f1: T,\n}",
2638+
description: "struct S<T>",
26492639
},
26502640
},
26512641
],
@@ -2704,7 +2694,7 @@ fn main() { let s$0t = S{ f1: S{ f1: Arg(0) } }; }
27042694
focus_range: 24..25,
27052695
name: "S",
27062696
kind: Struct,
2707-
description: "struct S<T> {\n f1: T,\n}",
2697+
description: "struct S<T>",
27082698
},
27092699
},
27102700
],
@@ -2957,7 +2947,7 @@ fn main() { let s$0t = foo(); }
29572947
focus_range: 39..41,
29582948
name: "S1",
29592949
kind: Struct,
2960-
description: "struct S1 {}",
2950+
description: "struct S1",
29612951
},
29622952
},
29632953
HoverGotoTypeData {
@@ -2970,7 +2960,7 @@ fn main() { let s$0t = foo(); }
29702960
focus_range: 52..54,
29712961
name: "S2",
29722962
kind: Struct,
2973-
description: "struct S2 {}",
2963+
description: "struct S2",
29742964
},
29752965
},
29762966
],
@@ -3061,7 +3051,7 @@ fn foo(ar$0g: &impl Foo + Bar<S>) {}
30613051
focus_range: 36..37,
30623052
name: "S",
30633053
kind: Struct,
3064-
description: "struct S {}",
3054+
description: "struct S",
30653055
},
30663056
},
30673057
],
@@ -3161,7 +3151,7 @@ fn foo(ar$0g: &impl Foo<S>) {}
31613151
focus_range: 23..24,
31623152
name: "S",
31633153
kind: Struct,
3164-
description: "struct S {}",
3154+
description: "struct S",
31653155
},
31663156
},
31673157
],
@@ -3198,7 +3188,7 @@ fn main() { let s$0t = foo(); }
31983188
focus_range: 49..50,
31993189
name: "B",
32003190
kind: Struct,
3201-
description: "struct B<T> {}",
3191+
description: "struct B<T>",
32023192
},
32033193
},
32043194
HoverGotoTypeData {
@@ -3287,7 +3277,7 @@ fn foo(ar$0g: &dyn Foo<S>) {}
32873277
focus_range: 23..24,
32883278
name: "S",
32893279
kind: Struct,
3290-
description: "struct S {}",
3280+
description: "struct S",
32913281
},
32923282
},
32933283
],
@@ -3322,7 +3312,7 @@ fn foo(a$0rg: &impl ImplTrait<B<dyn DynTrait<B<S>>>>) {}
33223312
focus_range: 50..51,
33233313
name: "B",
33243314
kind: Struct,
3325-
description: "struct B<T> {}",
3315+
description: "struct B<T>",
33263316
},
33273317
},
33283318
HoverGotoTypeData {
@@ -3361,7 +3351,7 @@ fn foo(a$0rg: &impl ImplTrait<B<dyn DynTrait<B<S>>>>) {}
33613351
focus_range: 65..66,
33623352
name: "S",
33633353
kind: Struct,
3364-
description: "struct S {}",
3354+
description: "struct S",
33653355
},
33663356
},
33673357
],

0 commit comments

Comments
 (0)