Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expr_store/lower/asm.rs')
-rw-r--r--crates/hir-def/src/expr_store/lower/asm.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/hir-def/src/expr_store/lower/asm.rs b/crates/hir-def/src/expr_store/lower/asm.rs
index ca331e84d3..9ef0306565 100644
--- a/crates/hir-def/src/expr_store/lower/asm.rs
+++ b/crates/hir-def/src/expr_store/lower/asm.rs
@@ -11,7 +11,6 @@ use tt::TextRange;
use crate::{
expr_store::lower::{ExprCollector, FxIndexSet},
hir::{AsmOperand, AsmOptions, Expr, ExprId, InlineAsm, InlineAsmRegOrRegClass},
- type_ref::TypeRef,
};
impl ExprCollector<'_> {
@@ -159,10 +158,12 @@ impl ExprCollector<'_> {
AsmOperand::Const(self.collect_expr_opt(c.expr()))
}
ast::AsmOperand::AsmSym(s) => {
- let Some(path) = s
- .path()
- .and_then(|p| self.lower_path(p, &mut |_| TypeRef::Error))
- else {
+ let Some(path) = s.path().and_then(|p| {
+ self.lower_path(
+ p,
+ &mut ExprCollector::impl_trait_error_allocator,
+ )
+ }) else {
continue;
};
AsmOperand::Sym(path)