@@ -494,6 +494,7 @@ fn main() {
494
494
}
495
495
//- /src/main.rs
496
496
#[rustc_builtin_macro] macro_rules! include {}
497
+ #[rustc_builtin_macro] macro_rules! include_str {}
497
498
#[rustc_builtin_macro] macro_rules! concat {}
498
499
#[rustc_builtin_macro] macro_rules! env {}
499
500
@@ -512,6 +513,7 @@ fn main() {
512
513
let va = A;
513
514
let vb = B;
514
515
let should_be_str = message();
516
+ let another_str = include_str!("main.rs");
515
517
}
516
518
"### ,
517
519
)
@@ -523,7 +525,15 @@ fn main() {
523
525
let res = server. send_request :: < HoverRequest > ( HoverParams {
524
526
text_document_position_params : TextDocumentPositionParams :: new (
525
527
server. doc_id ( "src/main.rs" ) ,
526
- Position :: new ( 18 , 10 ) ,
528
+ Position :: new ( 19 , 10 ) ,
529
+ ) ,
530
+ work_done_progress_params : Default :: default ( ) ,
531
+ } ) ;
532
+ assert ! ( res. to_string( ) . contains( "&str" ) ) ;
533
+ let res = server. send_request :: < HoverRequest > ( HoverParams {
534
+ text_document_position_params : TextDocumentPositionParams :: new (
535
+ server. doc_id ( "src/main.rs" ) ,
536
+ Position :: new ( 20 , 10 ) ,
527
537
) ,
528
538
work_done_progress_params : Default :: default ( ) ,
529
539
} ) ;
@@ -532,23 +542,23 @@ fn main() {
532
542
GotoDefinitionParams {
533
543
text_document_position_params : TextDocumentPositionParams :: new (
534
544
server. doc_id ( "src/main.rs" ) ,
535
- Position :: new ( 16 , 9 ) ,
545
+ Position :: new ( 17 , 9 ) ,
536
546
) ,
537
547
work_done_progress_params : Default :: default ( ) ,
538
548
partial_result_params : Default :: default ( ) ,
539
549
} ,
540
550
json ! ( [ {
541
551
"originSelectionRange" : {
542
- "end" : { "character" : 10 , "line" : 16 } ,
543
- "start" : { "character" : 8 , "line" : 16 }
552
+ "end" : { "character" : 10 , "line" : 17 } ,
553
+ "start" : { "character" : 8 , "line" : 17 }
544
554
} ,
545
555
"targetRange" : {
546
- "end" : { "character" : 9 , "line" : 7 } ,
547
- "start" : { "character" : 0 , "line" : 6 }
556
+ "end" : { "character" : 9 , "line" : 8 } ,
557
+ "start" : { "character" : 0 , "line" : 7 }
548
558
} ,
549
559
"targetSelectionRange" : {
550
- "end" : { "character" : 8 , "line" : 7 } ,
551
- "start" : { "character" : 7 , "line" : 7 }
560
+ "end" : { "character" : 8 , "line" : 8 } ,
561
+ "start" : { "character" : 7 , "line" : 8 }
552
562
} ,
553
563
"targetUri" : "file:///[..]src/main.rs"
554
564
} ] ) ,
@@ -557,23 +567,23 @@ fn main() {
557
567
GotoDefinitionParams {
558
568
text_document_position_params : TextDocumentPositionParams :: new (
559
569
server. doc_id ( "src/main.rs" ) ,
560
- Position :: new ( 17 , 9 ) ,
570
+ Position :: new ( 18 , 9 ) ,
561
571
) ,
562
572
work_done_progress_params : Default :: default ( ) ,
563
573
partial_result_params : Default :: default ( ) ,
564
574
} ,
565
575
json ! ( [ {
566
576
"originSelectionRange" : {
567
- "end" : { "character" : 10 , "line" : 17 } ,
568
- "start" : { "character" : 8 , "line" : 17 }
577
+ "end" : { "character" : 10 , "line" : 18 } ,
578
+ "start" : { "character" : 8 , "line" : 18 }
569
579
} ,
570
580
"targetRange" : {
571
- "end" : { "character" : 9 , "line" : 11 } ,
572
- "start" : { "character" : 0 , "line" : 10 }
581
+ "end" : { "character" : 9 , "line" : 12 } ,
582
+ "start" : { "character" : 0 , "line" : 11 }
573
583
} ,
574
584
"targetSelectionRange" : {
575
- "end" : { "character" : 8 , "line" : 11 } ,
576
- "start" : { "character" : 7 , "line" : 11 }
585
+ "end" : { "character" : 8 , "line" : 12 } ,
586
+ "start" : { "character" : 7 , "line" : 12 }
577
587
} ,
578
588
"targetUri" : "file:///[..]src/main.rs"
579
589
} ] ) ,
0 commit comments