Make Span
optional in BufferedEarlyLint
This commit is contained in:
parent
6a2cd0d50c
commit
eedb32dd12
5 changed files with 31 additions and 7 deletions
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue