mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Add reference here diagnostic
This commit is contained in:
parent
a9f115b36f
commit
be3e70c604
5 changed files with 231 additions and 5 deletions
|
@ -5,7 +5,7 @@
|
|||
//! be expressed in terms of hir types themselves.
|
||||
use cfg::{CfgExpr, CfgOptions};
|
||||
use either::Either;
|
||||
use hir_def::path::ModPath;
|
||||
use hir_def::{path::ModPath, type_ref::Mutability};
|
||||
use hir_expand::{name::Name, HirFileId, InFile};
|
||||
use syntax::{ast, AstPtr, SyntaxNodePtr, TextRange};
|
||||
|
||||
|
@ -28,6 +28,7 @@ macro_rules! diagnostics {
|
|||
}
|
||||
|
||||
diagnostics![
|
||||
AddReferenceHere,
|
||||
BreakOutsideOfLoop,
|
||||
InactiveCode,
|
||||
IncorrectCase,
|
||||
|
@ -154,4 +155,10 @@ pub struct MissingMatchArms {
|
|||
pub arms: AstPtr<ast::MatchArmList>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct AddReferenceHere {
|
||||
pub expr: InFile<AstPtr<ast::Expr>>,
|
||||
pub mutability: Mutability,
|
||||
}
|
||||
|
||||
pub use hir_ty::diagnostics::IncorrectCase;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue