mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
missing match arms diagnostic change source to match expression
This commit is contained in:
parent
5fe608fb31
commit
da6752d5f9
3 changed files with 7 additions and 3 deletions
|
@ -65,6 +65,7 @@ impl AstDiagnostic for MissingFields {
|
|||
#[derive(Debug)]
|
||||
pub struct MissingMatchArms {
|
||||
pub file: HirFileId,
|
||||
pub match_expr: AstPtr<ast::Expr>,
|
||||
pub arms: AstPtr<ast::MatchArmList>,
|
||||
}
|
||||
|
||||
|
@ -73,7 +74,7 @@ impl Diagnostic for MissingMatchArms {
|
|||
String::from("Missing match arm")
|
||||
}
|
||||
fn source(&self) -> InFile<SyntaxNodePtr> {
|
||||
InFile { file_id: self.file, value: self.arms.into() }
|
||||
InFile { file_id: self.file, value: self.match_expr.into() }
|
||||
}
|
||||
fn as_any(&self) -> &(dyn Any + Send + 'static) {
|
||||
self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue