Auto merge of #93511 - cjgillot:query-copy, r=oli-obk
Ensure that queries only return Copy types. This should pervent the perf footgun of returning a result with an expensive `Clone` impl (like a `Vec` of a hash map). I went for the stupid solution of allocating on an arena everything that was not `Copy`. Some query results could be made Copy easily, but I did not really investigate.
This commit is contained in:
@@ -658,13 +658,13 @@ fn write_out_deps(
|
||||
boxed_resolver.borrow_mut().access(|resolver| {
|
||||
for cnum in resolver.cstore().crates_untracked() {
|
||||
let source = resolver.cstore().crate_source_untracked(cnum);
|
||||
if let Some((path, _)) = source.dylib {
|
||||
if let Some((path, _)) = &source.dylib {
|
||||
files.push(escape_dep_filename(&path.display().to_string()));
|
||||
}
|
||||
if let Some((path, _)) = source.rlib {
|
||||
if let Some((path, _)) = &source.rlib {
|
||||
files.push(escape_dep_filename(&path.display().to_string()));
|
||||
}
|
||||
if let Some((path, _)) = source.rmeta {
|
||||
if let Some((path, _)) = &source.rmeta {
|
||||
files.push(escape_dep_filename(&path.display().to_string()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user