diff options
| author | Michael Goulet <michael@errs.io> | 2023-09-02 04:02:11 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-09-07 00:49:09 +0000 |
| commit | e10262ca0aa2ff434b33898d1d03413fdde60edf (patch) | |
| tree | 2ae53a01dc25e3c04aa6a7f0e1c7254a1142d8e5 /compiler/rustc_errors/src/lib.rs | |
| parent | b0d45536acf8be99036c6a1261359e3cf89f9d63 (diff) | |
| download | rust-e10262ca0aa2ff434b33898d1d03413fdde60edf.tar.gz rust-e10262ca0aa2ff434b33898d1d03413fdde60edf.zip | |
Implement refinement lint for RPITIT
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 55c4ec66cd9..31547f19be0 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -44,7 +44,7 @@ use rustc_fluent_macro::fluent_messages; pub use rustc_lint_defs::{pluralize, Applicability}; use rustc_span::source_map::SourceMap; pub use rustc_span::ErrorGuaranteed; -use rustc_span::{Loc, Span}; +use rustc_span::{Loc, Span, DUMMY_SP}; use std::borrow::Cow; use std::error::Report; @@ -1754,7 +1754,7 @@ impl DelayedDiagnostic { BacktraceStatus::Captured => { let inner = &self.inner; self.inner.subdiagnostic(DelayedAtWithNewline { - span: inner.span.primary_span().unwrap(), + span: inner.span.primary_span().unwrap_or(DUMMY_SP), emitted_at: inner.emitted_at.clone(), note: self.note, }); @@ -1764,7 +1764,7 @@ impl DelayedDiagnostic { _ => { let inner = &self.inner; self.inner.subdiagnostic(DelayedAtWithoutNewline { - span: inner.span.primary_span().unwrap(), + span: inner.span.primary_span().unwrap_or(DUMMY_SP), emitted_at: inner.emitted_at.clone(), note: self.note, }); |
