This repository was archived by the owner on Dec 29, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 6
6
- Support both owned and borrowed blacklisted crate names in ` rls-analysis `
7
7
- Publicly re-export ` rls_analysis::raw::Crate `
8
8
### Changed
9
+ - Formatting project files now only needs project to parse and expand macros (and not type-check)
9
10
- Converted remaining crates ` rls-* ` to 2018 edition
10
11
### Removed
11
12
- Removed ` use_crate_blacklist ` setting in favour of ` crate_blacklist `
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ impl rustc_driver::Callbacks for RlsRustcCalls {
166
166
Compilation :: Continue
167
167
}
168
168
169
- fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
169
+ fn after_expansion ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
170
170
let sess = compiler. session ( ) ;
171
171
let input = compiler. input ( ) ;
172
172
let crate_name = compiler. crate_name ( ) . unwrap ( ) . peek ( ) . clone ( ) ;
@@ -189,11 +189,20 @@ impl rustc_driver::Callbacks for RlsRustcCalls {
189
189
} ,
190
190
} ;
191
191
192
+ // We populate the file -> edition mapping only after expansion since it
193
+ // can pull additional input files
192
194
let mut input_files = self . input_files . lock ( ) . unwrap ( ) ;
193
195
for file in fetch_input_files ( sess) {
194
196
input_files. entry ( file) . or_default ( ) . insert ( krate. clone ( ) ) ;
195
197
}
196
198
199
+ Compilation :: Continue
200
+ }
201
+
202
+ fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
203
+ let input = compiler. input ( ) ;
204
+ let crate_name = compiler. crate_name ( ) . unwrap ( ) . peek ( ) . clone ( ) ;
205
+
197
206
// Guaranteed to not be dropped yet in the pipeline thanks to the
198
207
// `config.opts.debugging_opts.save_analysis` value being set to `true`.
199
208
let expanded_crate = & compiler. expansion ( ) . unwrap ( ) . peek ( ) . 0 ;
You can’t perform that action at this time.
0 commit comments