mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Fix string pattern matching in mir interpreter
This commit is contained in:
parent
dfaca9398a
commit
aab7589c40
6 changed files with 84 additions and 12 deletions
|
@ -829,7 +829,7 @@ impl<'ctx> MirLowerCtx<'ctx> {
|
|||
op,
|
||||
BinaryOp::ArithOp(ArithOp::Shl | ArithOp::Shr) | BinaryOp::Assignment { op: Some(ArithOp::Shl | ArithOp::Shr) }
|
||||
);
|
||||
lhs_ty.as_builtin().is_some() && rhs_ty.as_builtin().is_some() && (lhs_ty == rhs_ty || builtin_inequal_impls)
|
||||
lhs_ty.is_scalar() && rhs_ty.is_scalar() && (lhs_ty == rhs_ty || builtin_inequal_impls)
|
||||
};
|
||||
if !is_builtin {
|
||||
if let Some((func_id, generic_args)) = self.infer.method_resolution(expr_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue