@@ -494,6 +494,7 @@ fn main() {
494494}
495495//- /src/main.rs
496496#[rustc_builtin_macro] macro_rules! include {}
497+ #[rustc_builtin_macro] macro_rules! include_str {}
497498#[rustc_builtin_macro] macro_rules! concat {}
498499#[rustc_builtin_macro] macro_rules! env {}
499500
@@ -512,6 +513,7 @@ fn main() {
512513 let va = A;
513514 let vb = B;
514515 let should_be_str = message();
516+ let another_str = include_str!("main.rs");
515517}
516518"### ,
517519 )
@@ -523,7 +525,15 @@ fn main() {
523525 let res = server. send_request :: < HoverRequest > ( HoverParams {
524526 text_document_position_params : TextDocumentPositionParams :: new (
525527 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 ) ,
527537 ) ,
528538 work_done_progress_params : Default :: default ( ) ,
529539 } ) ;
@@ -532,23 +542,23 @@ fn main() {
532542 GotoDefinitionParams {
533543 text_document_position_params : TextDocumentPositionParams :: new (
534544 server. doc_id ( "src/main.rs" ) ,
535- Position :: new ( 16 , 9 ) ,
545+ Position :: new ( 17 , 9 ) ,
536546 ) ,
537547 work_done_progress_params : Default :: default ( ) ,
538548 partial_result_params : Default :: default ( ) ,
539549 } ,
540550 json ! ( [ {
541551 "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 }
544554 } ,
545555 "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 }
548558 } ,
549559 "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 }
552562 } ,
553563 "targetUri" : "file:///[..]src/main.rs"
554564 } ] ) ,
@@ -557,23 +567,23 @@ fn main() {
557567 GotoDefinitionParams {
558568 text_document_position_params : TextDocumentPositionParams :: new (
559569 server. doc_id ( "src/main.rs" ) ,
560- Position :: new ( 17 , 9 ) ,
570+ Position :: new ( 18 , 9 ) ,
561571 ) ,
562572 work_done_progress_params : Default :: default ( ) ,
563573 partial_result_params : Default :: default ( ) ,
564574 } ,
565575 json ! ( [ {
566576 "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 }
569579 } ,
570580 "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 }
573583 } ,
574584 "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 }
577587 } ,
578588 "targetUri" : "file:///[..]src/main.rs"
579589 } ] ) ,
0 commit comments