mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-31 13:02:57 +00:00
Merge pull request #19144 from gohome001/follow_up_implicit_drop
minor: don't show drop hints for other pattern
This commit is contained in:
commit
a73224f1dc
@ -73,8 +73,8 @@ pub(super) fn hints(
|
|||||||
_ => continue,
|
_ => continue,
|
||||||
},
|
},
|
||||||
MirSpan::PatId(p) => match source_map.pat_syntax(p) {
|
MirSpan::PatId(p) => match source_map.pat_syntax(p) {
|
||||||
Ok(s) => s.value.text_range(),
|
Ok(s) if !s.file_id.is_macro() => s.value.text_range(),
|
||||||
Err(_) => continue,
|
_ => continue,
|
||||||
},
|
},
|
||||||
MirSpan::BindingId(b) => {
|
MirSpan::BindingId(b) => {
|
||||||
match source_map
|
match source_map
|
||||||
@ -82,13 +82,13 @@ pub(super) fn hints(
|
|||||||
.iter()
|
.iter()
|
||||||
.find_map(|p| source_map.pat_syntax(*p).ok())
|
.find_map(|p| source_map.pat_syntax(*p).ok())
|
||||||
{
|
{
|
||||||
Some(s) => s.value.text_range(),
|
Some(s) if !s.file_id.is_macro() => s.value.text_range(),
|
||||||
None => continue,
|
_ => continue,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MirSpan::SelfParam => match source_map.self_param_syntax() {
|
MirSpan::SelfParam => match source_map.self_param_syntax() {
|
||||||
Some(s) => s.value.text_range(),
|
Some(s) if !s.file_id.is_macro() => s.value.text_range(),
|
||||||
None => continue,
|
_ => continue,
|
||||||
},
|
},
|
||||||
MirSpan::Unknown => continue,
|
MirSpan::Unknown => continue,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user