File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
crates/rust-analyzer/tests/rust-analyzer Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ version = "0.0.0"
54
54
use std::collections::Spam;
55
55
"# ,
56
56
)
57
+ . with_config ( serde_json:: json!( {
58
+ "cargo" : { "noSysroot" : false }
59
+ } ) )
57
60
. server ( )
58
61
. wait_until_workspace_is_loaded ( ) ;
59
62
@@ -450,6 +453,9 @@ fn main() {{}}
450
453
"# ,
451
454
librs, libs
452
455
) )
456
+ . with_config ( serde_json:: json!( {
457
+ "cargo" : { "noSysroot" : false }
458
+ } ) )
453
459
. server ( )
454
460
. wait_until_workspace_is_loaded ( ) ;
455
461
@@ -572,7 +578,10 @@ fn main() {
572
578
"### ,
573
579
)
574
580
. with_config ( serde_json:: json!( {
575
- "cargo" : { "loadOutDirsFromCheck" : true }
581
+ "cargo" : {
582
+ "loadOutDirsFromCheck" : true ,
583
+ "noSysroot" : true ,
584
+ }
576
585
} ) )
577
586
. server ( )
578
587
. wait_until_workspace_is_loaded ( ) ;
@@ -715,7 +724,10 @@ pub fn foo(_input: TokenStream) -> TokenStream {
715
724
"### ,
716
725
)
717
726
. with_config ( serde_json:: json!( {
718
- "cargo" : { "loadOutDirsFromCheck" : true } ,
727
+ "cargo" : {
728
+ "loadOutDirsFromCheck" : true ,
729
+ "noSysroot" : true ,
730
+ } ,
719
731
"procMacro" : {
720
732
"enable" : true ,
721
733
"server" : PathBuf :: from( env!( "CARGO_BIN_EXE_rust-analyzer" ) ) ,
Original file line number Diff line number Diff line change @@ -27,7 +27,15 @@ pub(crate) struct Project<'a> {
27
27
28
28
impl < ' a > Project < ' a > {
29
29
pub ( crate ) fn with_fixture ( fixture : & str ) -> Project {
30
- Project { fixture, tmp_dir : None , roots : vec ! [ ] , config : serde_json:: Value :: Null }
30
+ Project {
31
+ fixture,
32
+ tmp_dir : None ,
33
+ roots : vec ! [ ] ,
34
+ config : serde_json:: json!( {
35
+ // Loading standard library is costly, let's ignore it by default
36
+ "cargo" : { "noSysroot" : true }
37
+ } ) ,
38
+ }
31
39
}
32
40
33
41
pub ( crate ) fn tmp_dir ( mut self , tmp_dir : TestDir ) -> Project < ' a > {
You can’t perform that action at this time.
0 commit comments