mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Support more IDE features for asm operands
This commit is contained in:
parent
811905fce8
commit
95d8d8e697
13 changed files with 180 additions and 40 deletions
|
@ -913,8 +913,8 @@ impl SourceAnalyzer {
|
|||
let (expr, args) = body_source_map.asm_template_args(asm)?;
|
||||
Some(*def).zip(
|
||||
args.iter()
|
||||
.find(|(range, _)| range.contains_inclusive(offset))
|
||||
.map(|(range, idx)| (expr, *range, *idx)),
|
||||
.find(|(range, _, _)| range.contains_inclusive(offset))
|
||||
.map(|(range, idx, _)| (expr, *range, *idx)),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -944,7 +944,7 @@ impl SourceAnalyzer {
|
|||
pub(crate) fn as_asm_parts(
|
||||
&self,
|
||||
asm: InFile<&ast::AsmExpr>,
|
||||
) -> Option<(DefWithBodyId, (ExprId, &[(TextRange, usize)]))> {
|
||||
) -> Option<(DefWithBodyId, (ExprId, &[(TextRange, usize, Option<Name>)]))> {
|
||||
let (def, _, body_source_map) = self.def.as_ref()?;
|
||||
Some(*def).zip(body_source_map.asm_template_args(asm))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue