about summary refs log tree commit diff
path: root/compiler/rustc_lint_defs/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint_defs/src/lib.rs')
-rw-r--r--compiler/rustc_lint_defs/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint_defs/src/lib.rs b/compiler/rustc_lint_defs/src/lib.rs
index 19efa36b40f..d08ef8a0d97 100644
--- a/compiler/rustc_lint_defs/src/lib.rs
+++ b/compiler/rustc_lint_defs/src/lib.rs
@@ -753,7 +753,7 @@ pub enum BuiltinLintDiag {
 #[derive(Debug)]
 pub struct BufferedEarlyLint {
     /// The span of code that we are linting on.
-    pub span: MultiSpan,
+    pub span: Option<MultiSpan>,
 
     /// The `NodeId` of the AST node that generated the lint.
     pub node_id: NodeId,
@@ -791,7 +791,7 @@ impl LintBuffer {
         self.add_early_lint(BufferedEarlyLint {
             lint_id: LintId::of(lint),
             node_id,
-            span: span.into(),
+            span: Some(span.into()),
             diagnostic,
         });
     }