File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ impl<'a> RustAnalyzer<'a> {
7373 RustAnalyzer :: WithSemantics { vfs, semantics }
7474 }
7575 pub fn parse ( & self , path : & Path ) -> ParseResult {
76- let mut no_semantics_reason = "" ;
76+ let no_semantics_reason;
7777 match self {
7878 RustAnalyzer :: WithSemantics { vfs, semantics } => {
7979 if let Some ( file_id) = path_to_file_id ( path, vfs) {
@@ -94,15 +94,14 @@ impl<'a> RustAnalyzer<'a> {
9494 errors,
9595 semantics_info : Ok ( FileSemanticInformation { file_id, semantics } ) ,
9696 } ;
97- } else {
98- debug ! (
99- "No text available for file_id '{:?}', falling back to loading file '{}' from disk." ,
100- file_id,
101- path. to_string_lossy( )
102- ) ;
103- no_semantics_reason = "file not found in project" ;
10497 }
98+ debug ! (
99+ "No text available for file_id '{:?}', falling back to loading file '{}' from disk." ,
100+ file_id,
101+ path. to_string_lossy( )
102+ ) ;
105103 }
104+ no_semantics_reason = "file not found in project" ;
106105 }
107106 RustAnalyzer :: WithoutSemantics { reason } => {
108107 no_semantics_reason = reason;
You can’t perform that action at this time.
0 commit comments