mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Merge #5823
5823: Don't underline function definition if self is &mut r=Nashenas88 a=matklad The self is right there, and is already underlined, so it makes little sense to emit even more underlines. before:  after:  Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
e65d48d1fb
2 changed files with 2 additions and 8 deletions
|
@ -748,12 +748,6 @@ fn highlight_def(db: &RootDatabase, def: Definition) -> Highlight {
|
|||
if func.is_unsafe(db) {
|
||||
h |= HighlightModifier::Unsafe;
|
||||
}
|
||||
if let Some(self_param) = func.self_param(db) {
|
||||
match self_param.access(db) {
|
||||
hir::Access::Exclusive => h |= HighlightModifier::Mutable,
|
||||
hir::Access::Shared | hir::Access::Owned => (),
|
||||
}
|
||||
}
|
||||
return h;
|
||||
}
|
||||
hir::ModuleDef::Adt(hir::Adt::Struct(_)) => HighlightTag::Struct,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue