about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/rustfmt/src/source_file.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/rustfmt/src/source_file.rs b/src/tools/rustfmt/src/source_file.rs
index 958f9b0154f..512a8593c27 100644
--- a/src/tools/rustfmt/src/source_file.rs
+++ b/src/tools/rustfmt/src/source_file.rs
@@ -66,6 +66,7 @@ where
         }
     }
 
+    #[cfg_attr(not(bootstrap), allow(non_local_definitions))]
     impl From<&FileName> for rustc_span::FileName {
         fn from(filename: &FileName) -> rustc_span::FileName {
             match filename {