@@ -685,7 +685,7 @@ version = \"0.0.0\"
685
685
#[ test]
686
686
fn out_dirs_check ( ) {
687
687
if skip_slow_tests ( ) {
688
- // return;
688
+ return ;
689
689
}
690
690
691
691
let server = Project :: with_fixture (
@@ -711,10 +711,20 @@ fn main() {
711
711
println!("cargo:rerun-if-changed=build.rs");
712
712
}
713
713
//- /src/main.rs
714
- #[rustc_builtin_macro] macro_rules! include {}
715
- #[rustc_builtin_macro] macro_rules! include_str {}
716
- #[rustc_builtin_macro] macro_rules! concat {}
717
- #[rustc_builtin_macro] macro_rules! env {}
714
+ #![feature(rustc_attrs)]
715
+ #[rustc_builtin_macro] macro_rules! include {
716
+ ($file:expr $(,)?) => {{ /* compiler built-in */ }};
717
+ }
718
+ #[rustc_builtin_macro] macro_rules! include_str {
719
+ ($file:expr $(,)?) => {{ /* compiler built-in */ }};
720
+ }
721
+ #[rustc_builtin_macro] macro_rules! concat {
722
+ ($($e:ident),+ $(,)?) => {{ /* compiler built-in */ }};
723
+ }
724
+ #[rustc_builtin_macro] macro_rules! env {
725
+ ($name:expr $(,)?) => {{ /* compiler built-in */ }};
726
+ ($name:expr, $error_msg:expr $(,)?) => {{ /* compiler built-in */ }};
727
+ }
718
728
719
729
include!(concat!(env!("OUT_DIR"), "/hello.rs"));
720
730
@@ -749,7 +759,7 @@ fn main() {
749
759
let res = server. send_request :: < HoverRequest > ( HoverParams {
750
760
text_document_position_params : TextDocumentPositionParams :: new (
751
761
server. doc_id ( "src/main.rs" ) ,
752
- Position :: new ( 19 , 10 ) ,
762
+ Position :: new ( 29 , 10 ) ,
753
763
) ,
754
764
work_done_progress_params : Default :: default ( ) ,
755
765
} ) ;
@@ -758,7 +768,7 @@ fn main() {
758
768
let res = server. send_request :: < HoverRequest > ( HoverParams {
759
769
text_document_position_params : TextDocumentPositionParams :: new (
760
770
server. doc_id ( "src/main.rs" ) ,
761
- Position :: new ( 20 , 10 ) ,
771
+ Position :: new ( 30 , 10 ) ,
762
772
) ,
763
773
work_done_progress_params : Default :: default ( ) ,
764
774
} ) ;
@@ -768,23 +778,23 @@ fn main() {
768
778
GotoDefinitionParams {
769
779
text_document_position_params : TextDocumentPositionParams :: new (
770
780
server. doc_id ( "src/main.rs" ) ,
771
- Position :: new ( 17 , 9 ) ,
781
+ Position :: new ( 27 , 9 ) ,
772
782
) ,
773
783
work_done_progress_params : Default :: default ( ) ,
774
784
partial_result_params : Default :: default ( ) ,
775
785
} ,
776
786
json ! ( [ {
777
787
"originSelectionRange" : {
778
- "end" : { "character" : 10 , "line" : 17 } ,
779
- "start" : { "character" : 8 , "line" : 17 }
788
+ "end" : { "character" : 10 , "line" : 27 } ,
789
+ "start" : { "character" : 8 , "line" : 27 }
780
790
} ,
781
791
"targetRange" : {
782
- "end" : { "character" : 9 , "line" : 8 } ,
783
- "start" : { "character" : 0 , "line" : 7 }
792
+ "end" : { "character" : 9 , "line" : 18 } ,
793
+ "start" : { "character" : 0 , "line" : 17 }
784
794
} ,
785
795
"targetSelectionRange" : {
786
- "end" : { "character" : 8 , "line" : 8 } ,
787
- "start" : { "character" : 7 , "line" : 8 }
796
+ "end" : { "character" : 8 , "line" : 18 } ,
797
+ "start" : { "character" : 7 , "line" : 18 }
788
798
} ,
789
799
"targetUri" : "file:///[..]src/main.rs"
790
800
} ] ) ,
@@ -794,23 +804,23 @@ fn main() {
794
804
GotoDefinitionParams {
795
805
text_document_position_params : TextDocumentPositionParams :: new (
796
806
server. doc_id ( "src/main.rs" ) ,
797
- Position :: new ( 18 , 9 ) ,
807
+ Position :: new ( 28 , 9 ) ,
798
808
) ,
799
809
work_done_progress_params : Default :: default ( ) ,
800
810
partial_result_params : Default :: default ( ) ,
801
811
} ,
802
812
json ! ( [ {
803
813
"originSelectionRange" : {
804
- "end" : { "character" : 10 , "line" : 18 } ,
805
- "start" : { "character" : 8 , "line" : 18 }
814
+ "end" : { "character" : 10 , "line" : 28 } ,
815
+ "start" : { "character" : 8 , "line" : 28 }
806
816
} ,
807
817
"targetRange" : {
808
- "end" : { "character" : 9 , "line" : 12 } ,
809
- "start" : { "character" : 0 , "line" : 11 }
818
+ "end" : { "character" : 9 , "line" : 22 } ,
819
+ "start" : { "character" : 0 , "line" : 21 }
810
820
} ,
811
821
"targetSelectionRange" : {
812
- "end" : { "character" : 8 , "line" : 12 } ,
813
- "start" : { "character" : 7 , "line" : 12 }
822
+ "end" : { "character" : 8 , "line" : 22 } ,
823
+ "start" : { "character" : 7 , "line" : 22 }
814
824
} ,
815
825
"targetUri" : "file:///[..]src/main.rs"
816
826
} ] ) ,
@@ -836,6 +846,7 @@ edition = "2021"
836
846
bar = {path = "../bar"}
837
847
838
848
//- /foo/src/main.rs
849
+ #![feature(rustc_attrs, decl_macro)]
839
850
use bar::Bar;
840
851
841
852
#[rustc_builtin_macro]
@@ -912,7 +923,7 @@ pub fn foo(_input: TokenStream) -> TokenStream {
912
923
let res = server. send_request :: < HoverRequest > ( HoverParams {
913
924
text_document_position_params : TextDocumentPositionParams :: new (
914
925
server. doc_id ( "foo/src/main.rs" ) ,
915
- Position :: new ( 10 , 9 ) ,
926
+ Position :: new ( 11 , 9 ) ,
916
927
) ,
917
928
work_done_progress_params : Default :: default ( ) ,
918
929
} ) ;
0 commit comments