@@ -737,7 +737,7 @@ impl CStore {
737737 . maybe_resolve_crate (
738738 tcx,
739739 sym:: core,
740- CrateDepKind :: Explicit ,
740+ CrateDepKind :: Unconditional ,
741741 CrateOrigin :: Extern ,
742742 )
743743 . is_err ( ) ;
@@ -985,11 +985,15 @@ impl CStore {
985985 } ;
986986 info ! ( "panic runtime not found -- loading {}" , name) ;
987987
988- // This has to be implicit as both panic_unwind and panic_abort may be present in the crate
989- // graph at the same time. One of them will later be activated in dependency_formats.
990- let Some ( cnum) =
991- self . resolve_crate ( tcx, name, DUMMY_SP , CrateDepKind :: Implicit , CrateOrigin :: Injected )
992- else {
988+ // This has to be conditional as both panic_unwind and panic_abort may be present in the
989+ // crate graph at the same time. One of them will later be activated in dependency_formats.
990+ let Some ( cnum) = self . resolve_crate (
991+ tcx,
992+ name,
993+ DUMMY_SP ,
994+ CrateDepKind :: Conditional ,
995+ CrateOrigin :: Injected ,
996+ ) else {
993997 return ;
994998 } ;
995999 let data = self . get_crate_data ( cnum) ;
@@ -1017,9 +1021,13 @@ impl CStore {
10171021 info ! ( "loading profiler" ) ;
10181022
10191023 let name = Symbol :: intern ( & tcx. sess . opts . unstable_opts . profiler_runtime ) ;
1020- let Some ( cnum) =
1021- self . resolve_crate ( tcx, name, DUMMY_SP , CrateDepKind :: Explicit , CrateOrigin :: Injected )
1022- else {
1024+ let Some ( cnum) = self . resolve_crate (
1025+ tcx,
1026+ name,
1027+ DUMMY_SP ,
1028+ CrateDepKind :: Unconditional ,
1029+ CrateOrigin :: Injected ,
1030+ ) else {
10231031 return ;
10241032 } ;
10251033 let data = self . get_crate_data ( cnum) ;
@@ -1139,7 +1147,7 @@ impl CStore {
11391147 tcx,
11401148 name_interned,
11411149 DUMMY_SP ,
1142- CrateDepKind :: Explicit ,
1150+ CrateDepKind :: Unconditional ,
11431151 CrateOrigin :: Extern ,
11441152 ) ;
11451153 }
@@ -1171,7 +1179,7 @@ impl CStore {
11711179 tcx,
11721180 sym:: compiler_builtins,
11731181 krate. spans . inner_span . shrink_to_lo ( ) ,
1174- CrateDepKind :: Explicit ,
1182+ CrateDepKind :: Unconditional ,
11751183 CrateOrigin :: Injected ,
11761184 ) else {
11771185 info ! ( "`compiler_builtins` not resolved" ) ;
@@ -1288,7 +1296,7 @@ impl CStore {
12881296 let dep_kind = if attr:: contains_name ( & item. attrs , sym:: no_link) {
12891297 CrateDepKind :: MacrosOnly
12901298 } else {
1291- CrateDepKind :: Explicit
1299+ CrateDepKind :: Unconditional
12921300 } ;
12931301
12941302 let cnum =
@@ -1318,7 +1326,7 @@ impl CStore {
13181326 span : Span ,
13191327 ) -> Option < CrateNum > {
13201328 let cnum =
1321- self . resolve_crate ( tcx, name, span, CrateDepKind :: Explicit , CrateOrigin :: Extern ) ?;
1329+ self . resolve_crate ( tcx, name, span, CrateDepKind :: Unconditional , CrateOrigin :: Extern ) ?;
13221330
13231331 self . update_extern_crate (
13241332 cnum,
@@ -1336,7 +1344,7 @@ impl CStore {
13361344 }
13371345
13381346 pub fn maybe_process_path_extern ( & mut self , tcx : TyCtxt < ' _ > , name : Symbol ) -> Option < CrateNum > {
1339- self . maybe_resolve_crate ( tcx, name, CrateDepKind :: Explicit , CrateOrigin :: Extern ) . ok ( )
1347+ self . maybe_resolve_crate ( tcx, name, CrateDepKind :: Unconditional , CrateOrigin :: Extern ) . ok ( )
13401348 }
13411349}
13421350
0 commit comments