Auto merge of #115418 - Zoxc:freeze-source, r=oli-obk
Use `Freeze` for `SourceFile` This uses the `Freeze` type in `SourceFile` to let accessing `external_src` and `lines` be lock-free. Behavior of `add_external_src` is changed to set `ExternalSourceKind::AbsentErr` on a hash mismatch which matches the documentation. `ExternalSourceKind::Unneeded` was removed as it's unused. Based on https://github.com/rust-lang/rust/pull/115401.
This commit is contained in:
commit
26f4b72724
16 changed files with 294 additions and 225 deletions
|
@ -273,7 +273,7 @@ impl CodeSuggestion {
|
|||
assert!(!lines.lines.is_empty() || bounding_span.is_dummy());
|
||||
|
||||
// We can't splice anything if the source is unavailable.
|
||||
if !sm.ensure_source_file_source_present(lines.file.clone()) {
|
||||
if !sm.ensure_source_file_source_present(&lines.file) {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue