1
Fork 0

Rollup merge of #131344 - nnethercote:ref-Lrc, r=compiler-errors

Avoid `&Lrc<T>` in various places

Seeing `&Lrc<T>` is a bit suspicious, and `&T` or `Lrc<T>` is often better.

r? `@oli-obk`
This commit is contained in:
Matthias Krüger 2024-10-07 12:23:54 +02:00 committed by GitHub
commit df61a0b1b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 45 additions and 39 deletions

View file

@ -11,7 +11,6 @@ use rustc_ast::attr;
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
use rustc_data_structures::memmap::Mmap;
use rustc_data_structures::profiling::{SelfProfilerRef, VerboseTimingGuard};
use rustc_data_structures::sync::Lrc;
use rustc_errors::emitter::Emitter;
use rustc_errors::translation::Translate;
use rustc_errors::{
@ -1889,7 +1888,7 @@ impl SharedEmitter {
}
impl Translate for SharedEmitter {
fn fluent_bundle(&self) -> Option<&Lrc<FluentBundle>> {
fn fluent_bundle(&self) -> Option<&FluentBundle> {
None
}
@ -1924,7 +1923,7 @@ impl Emitter for SharedEmitter {
);
}
fn source_map(&self) -> Option<&Lrc<SourceMap>> {
fn source_map(&self) -> Option<&SourceMap> {
None
}
}