mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
fix: Fix lens location "above_whole_item" breaking lenses
This commit is contained in:
parent
affe5a7315
commit
712e67cf11
3 changed files with 16 additions and 18 deletions
|
@ -94,10 +94,9 @@ pub(crate) fn annotations(
|
|||
enum_
|
||||
.variants(db)
|
||||
.into_iter()
|
||||
.map(|variant| {
|
||||
.filter_map(|variant| {
|
||||
variant.source(db).and_then(|node| name_range(db, node, file_id))
|
||||
})
|
||||
.flatten()
|
||||
.for_each(|range| {
|
||||
let (annotation_range, target_position) = mk_ranges(range);
|
||||
annotations.push(Annotation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue