File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,18 @@ impl Sysroot {
128128 }
129129
130130 if let Some ( alloc) = sysroot. by_name ( "alloc" ) {
131- if let Some ( core) = sysroot. by_name ( "core" ) {
132- sysroot. crates [ alloc] . deps . push ( core) ;
131+ for dep in ALLOC_DEPS . trim ( ) . lines ( ) {
132+ if let Some ( dep) = sysroot. by_name ( dep) {
133+ sysroot. crates [ alloc] . deps . push ( dep)
134+ }
133135 }
134136 }
135137
136138 if let Some ( proc_macro) = sysroot. by_name ( "proc_macro" ) {
137- if let Some ( std) = sysroot. by_name ( "std" ) {
138- sysroot. crates [ proc_macro] . deps . push ( std) ;
139+ for dep in PROC_MACRO_DEPS . trim ( ) . lines ( ) {
140+ if let Some ( dep) = sysroot. by_name ( dep) {
141+ sysroot. crates [ proc_macro] . deps . push ( dep)
142+ }
139143 }
140144 }
141145
@@ -239,24 +243,27 @@ fn get_rust_src(sysroot_path: &AbsPath) -> Option<AbsPathBuf> {
239243
240244const SYSROOT_CRATES : & str = "
241245alloc
246+ backtrace
242247core
243248panic_abort
244249panic_unwind
245250proc_macro
246251profiler_builtins
247252std
248253stdarch/crates/std_detect
249- term
250254test
251255unwind" ;
252256
257+ const ALLOC_DEPS : & str = "core" ;
258+
253259const STD_DEPS : & str = "
254260alloc
255- core
256- panic_abort
257261panic_unwind
262+ panic_abort
263+ core
258264profiler_builtins
265+ unwind
259266std_detect
260- term
261- test
262- unwind ";
267+ test" ;
268+
269+ const PROC_MACRO_DEPS : & str = "std ";
You can’t perform that action at this time.
0 commit comments