mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Report incorrect case for fn inner items
This commit is contained in:
parent
cc2f0ec32c
commit
b53a07835b
3 changed files with 52 additions and 30 deletions
|
@ -378,11 +378,6 @@ impl ModuleDef {
|
|||
ModuleDef::BuiltinType(_) | ModuleDef::Macro(_) => return Vec::new(),
|
||||
};
|
||||
|
||||
let module = match self.module(db) {
|
||||
Some(it) => it,
|
||||
None => return Vec::new(),
|
||||
};
|
||||
|
||||
let mut acc = Vec::new();
|
||||
|
||||
match self.as_def_with_body() {
|
||||
|
@ -390,7 +385,7 @@ impl ModuleDef {
|
|||
def.diagnostics(db, &mut acc);
|
||||
}
|
||||
None => {
|
||||
for diag in hir_ty::diagnostics::incorrect_case(db, module.id.krate(), id) {
|
||||
for diag in hir_ty::diagnostics::incorrect_case(db, id) {
|
||||
acc.push(diag.into())
|
||||
}
|
||||
}
|
||||
|
@ -1820,7 +1815,7 @@ impl DefWithBody {
|
|||
// FIXME: don't ignore diagnostics for in type const
|
||||
DefWithBody::InTypeConst(_) => return,
|
||||
};
|
||||
for diag in hir_ty::diagnostics::incorrect_case(db, krate, def.into()) {
|
||||
for diag in hir_ty::diagnostics::incorrect_case(db, def.into()) {
|
||||
acc.push(diag.into())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue