about summary refs log tree commit diff
path: root/src/tools/rustfmt
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-10-07 11:03:52 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-10-07 13:56:29 +1100
commit731469fee50133528c1904a07da73e739db6f6c4 (patch)
treede053a2993fbd3c011f8f25aaf2601fc30ef17ff /src/tools/rustfmt
parent55a22d2a63334e0faff0202b72a31ce832b56125 (diff)
downloadrust-731469fee50133528c1904a07da73e739db6f6c4.tar.gz
rust-731469fee50133528c1904a07da73e739db6f6c4.zip
Convert `Option<&Lrc<T>>` return types to `Option<&T>`.
It's simpler and more concise.
Diffstat (limited to 'src/tools/rustfmt')
-rw-r--r--src/tools/rustfmt/src/parse/session.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/rustfmt/src/parse/session.rs b/src/tools/rustfmt/src/parse/session.rs
index 9f27a05939e..54ad56ed3f3 100644
--- a/src/tools/rustfmt/src/parse/session.rs
+++ b/src/tools/rustfmt/src/parse/session.rs
@@ -46,7 +46,7 @@ impl SilentOnIgnoredFilesEmitter {
 }
 
 impl Translate for SilentOnIgnoredFilesEmitter {
-    fn fluent_bundle(&self) -> Option<&Lrc<rustc_errors::FluentBundle>> {
+    fn fluent_bundle(&self) -> Option<&rustc_errors::FluentBundle> {
         self.emitter.fluent_bundle()
     }
 
@@ -56,7 +56,7 @@ impl Translate for SilentOnIgnoredFilesEmitter {
 }
 
 impl Emitter for SilentOnIgnoredFilesEmitter {
-    fn source_map(&self) -> Option<&Lrc<SourceMap>> {
+    fn source_map(&self) -> Option<&SourceMap> {
         None
     }
 
@@ -344,7 +344,7 @@ mod tests {
         }
 
         impl Translate for TestEmitter {
-            fn fluent_bundle(&self) -> Option<&Lrc<rustc_errors::FluentBundle>> {
+            fn fluent_bundle(&self) -> Option<&rustc_errors::FluentBundle> {
                 None
             }
 
@@ -354,7 +354,7 @@ mod tests {
         }
 
         impl Emitter for TestEmitter {
-            fn source_map(&self) -> Option<&Lrc<SourceMap>> {
+            fn source_map(&self) -> Option<&SourceMap> {
                 None
             }