spawned off of #64872
The match input here (on line 245):
|
let formats = tcx.dependency_formats(LOCAL_CRATE); |
|
let remove_generics = formats.iter().any(|(_ty, list)| { |
|
match list.get(def_id.krate.as_usize() - 1) { |
|
Some(Linkage::IncludedFromDylib) | Some(Linkage::Dynamic) => true, |
|
_ => false, |
|
} |
|
}); |
sometimes returns None
Its not yet clear to me under which scenarios that happens. But when it does happen, the dependency may be (re)exported from a static or a dynamic crate. This is probably a sign that the logic here needs to be revised in some way (assuming that the information in question is available somewhere in the data structures; otherwise, we'll need to try to add it).
In any case, this issue is to log the problem, so that I can link to it from any tests I encounter that were previously assuming that the -Z share-generics optimization would always fire in this scenario.
spawned off of #64872
The
matchinput here (on line 245):rust/src/librustc_metadata/cstore_impl.rs
Lines 243 to 249 in 9285d40
sometimes returns
NoneIts not yet clear to me under which scenarios that happens. But when it does happen, the dependency may be (re)exported from a static or a dynamic crate. This is probably a sign that the logic here needs to be revised in some way (assuming that the information in question is available somewhere in the data structures; otherwise, we'll need to try to add it).
In any case, this issue is to log the problem, so that I can link to it from any tests I encounter that were previously assuming that the
-Z share-genericsoptimization would always fire in this scenario.