mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Fix type mismatch caused by macros
MacroStmts should be completely transparent, but it prevented coercion. (I should maybe give `infer_expr` and `infer_expr_inner` better names.)
This commit is contained in:
parent
8b049ec393
commit
b26a472ccb
2 changed files with 45 additions and 1 deletions
|
@ -805,7 +805,7 @@ impl<'a> InferenceContext<'a> {
|
|||
None => self.table.new_float_var(),
|
||||
},
|
||||
},
|
||||
Expr::MacroStmts { tail } => self.infer_expr(*tail, expected),
|
||||
Expr::MacroStmts { tail } => self.infer_expr_inner(*tail, expected),
|
||||
};
|
||||
// use a new type variable if we got unknown here
|
||||
let ty = self.insert_type_vars_shallow(ty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue