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 66- Support both owned and borrowed blacklisted crate names in ` rls-analysis `
77- Publicly re-export ` rls_analysis::raw::Crate `
88### Changed
9+ - Formatting project files now only needs project to parse and expand macros (and not type-check)
910- Converted remaining crates ` rls-* ` to 2018 edition
1011### Removed
1112- 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 {
166166 Compilation :: Continue
167167 }
168168
169- fn after_analysis ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
169+ fn after_expansion ( & mut self , compiler : & interface:: Compiler ) -> Compilation {
170170 let sess = compiler. session ( ) ;
171171 let input = compiler. input ( ) ;
172172 let crate_name = compiler. crate_name ( ) . unwrap ( ) . peek ( ) . clone ( ) ;
@@ -189,11 +189,20 @@ impl rustc_driver::Callbacks for RlsRustcCalls {
189189 } ,
190190 } ;
191191
192+ // We populate the file -> edition mapping only after expansion since it
193+ // can pull additional input files
192194 let mut input_files = self . input_files . lock ( ) . unwrap ( ) ;
193195 for file in fetch_input_files ( sess) {
194196 input_files. entry ( file) . or_default ( ) . insert ( krate. clone ( ) ) ;
195197 }
196198
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+
197206 // Guaranteed to not be dropped yet in the pipeline thanks to the
198207 // `config.opts.debugging_opts.save_analysis` value being set to `true`.
199208 let expanded_crate = & compiler. expansion ( ) . unwrap ( ) . peek ( ) . 0 ;
You can’t perform that action at this time.
0 commit comments