Auto merge of #89016 - lcnr:non_blanket_impls, r=nikomatsakis,michaelwoerister
fix non_blanket_impls iteration order We sometimes iterate over all `non_blanket_impls`, not sure if this is observable outside of error messages (i.e. as incremental bugs). This should fix the underlying issue of #86986. second attempt of #88718 r? `@nikomatsakis`
This commit is contained in:
@@ -277,7 +277,7 @@ fn attempt_static(tcx: TyCtxt<'_>) -> Option<DependencyList> {
|
||||
let all_crates_available_as_rlib = tcx
|
||||
.crates(())
|
||||
.iter()
|
||||
.cloned()
|
||||
.copied()
|
||||
.filter_map(|cnum| {
|
||||
if tcx.dep_kind(cnum).macros_only() {
|
||||
return None;
|
||||
@@ -291,10 +291,11 @@ fn attempt_static(tcx: TyCtxt<'_>) -> Option<DependencyList> {
|
||||
|
||||
// All crates are available in an rlib format, so we're just going to link
|
||||
// everything in explicitly so long as it's actually required.
|
||||
let last_crate = tcx.crates(()).len();
|
||||
let mut ret = (1..last_crate + 1)
|
||||
.map(|cnum| {
|
||||
if tcx.dep_kind(CrateNum::new(cnum)) == CrateDepKind::Explicit {
|
||||
let mut ret = tcx
|
||||
.crates(())
|
||||
.iter()
|
||||
.map(|&cnum| {
|
||||
if tcx.dep_kind(cnum) == CrateDepKind::Explicit {
|
||||
Linkage::Static
|
||||
} else {
|
||||
Linkage::NotLinked
|
||||
|
||||
Reference in New Issue
Block a user