mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
spans always come from real file
This commit is contained in:
parent
394d11b0fa
commit
30093a6d81
57 changed files with 1369 additions and 1224 deletions
|
@ -2,6 +2,7 @@
|
|||
//!
|
||||
//! Tests live in [`bind_pat`][super::bind_pat] module.
|
||||
use ide_db::{base_db::FileId, famous_defs::FamousDefs};
|
||||
use stdx::TupleExt;
|
||||
use syntax::ast::{self, AstNode};
|
||||
use text_edit::{TextRange, TextSize};
|
||||
|
||||
|
@ -73,7 +74,9 @@ pub(super) fn hints(
|
|||
capture.display_place(sema.db)
|
||||
),
|
||||
None,
|
||||
source.name().and_then(|name| name.syntax().original_file_range_opt(sema.db)),
|
||||
source.name().and_then(|name| {
|
||||
name.syntax().original_file_range_opt(sema.db).map(TupleExt::head)
|
||||
}),
|
||||
);
|
||||
acc.push(InlayHint {
|
||||
needs_resolve: label.needs_resolve(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue