File tree Expand file tree Collapse file tree 1 file changed +39
-32
lines changed Expand file tree Collapse file tree 1 file changed +39
-32
lines changed Original file line number Diff line number Diff line change @@ -2361,46 +2361,53 @@ fn foo(ar$0g: &impl Foo + Bar<S>) {}
2361
2361
fn test_hover_async_block_impl_trait_has_goto_type_action ( ) {
2362
2362
check_actions (
2363
2363
r#"
2364
- //- minicore: future
2364
+ //- /main.rs crate:main deps:core
2365
+ // we don't use minicore here so that this test doesn't randomly fail
2366
+ // when someone edits minicore
2365
2367
struct S;
2366
2368
fn foo() {
2367
2369
let fo$0o = async { S };
2368
2370
}
2371
+ //- /core.rs crate:core
2372
+ pub mod future {
2373
+ #[lang = "future_trait"]
2374
+ pub trait Future {}
2375
+ }
2369
2376
"# ,
2370
2377
expect ! [ [ r#"
2371
- [
2372
- GoToType(
2373
- [
2374
- HoverGotoTypeData {
2375
- mod_path: "core::future::Future",
2376
- nav: NavigationTarget {
2377
- file_id: FileId(
2378
- 1,
2379
- ),
2380
- full_range: 276..458,
2381
- focus_range: 315..321,
2382
- name: "Future",
2383
- kind: Trait,
2384
- description: "pub trait Future",
2385
- },
2378
+ [
2379
+ GoToType(
2380
+ [
2381
+ HoverGotoTypeData {
2382
+ mod_path: "core::future::Future",
2383
+ nav: NavigationTarget {
2384
+ file_id: FileId(
2385
+ 1,
2386
+ ),
2387
+ full_range: 21..69,
2388
+ focus_range: 60..66,
2389
+ name: "Future",
2390
+ kind: Trait,
2391
+ description: "pub trait Future",
2386
2392
},
2387
- HoverGotoTypeData {
2388
- mod_path: "test::S",
2389
- nav: NavigationTarget {
2390
- file_id: FileId(
2391
- 0,
2392
- ) ,
2393
- full_range: 0..9 ,
2394
- focus_range: 7..8 ,
2395
- name: "S" ,
2396
- kind: Struct ,
2397
- description: "struct S" ,
2398
- } ,
2393
+ },
2394
+ HoverGotoTypeData {
2395
+ mod_path: "main::S",
2396
+ nav: NavigationTarget {
2397
+ file_id: FileId(
2398
+ 0 ,
2399
+ ) ,
2400
+ full_range: 0..110 ,
2401
+ focus_range: 108..109 ,
2402
+ name: "S" ,
2403
+ kind: Struct ,
2404
+ description: "struct S" ,
2399
2405
},
2400
- ],
2401
- ),
2402
- ]
2403
- "# ] ] ,
2406
+ },
2407
+ ],
2408
+ ),
2409
+ ]
2410
+ "# ] ] ,
2404
2411
) ;
2405
2412
}
2406
2413
You can’t perform that action at this time.
0 commit comments