mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
match_like_matches_macro
This commit is contained in:
parent
2ae2512378
commit
add40c8660
9 changed files with 29 additions and 43 deletions
|
@ -1387,10 +1387,10 @@ impl Evaluator<'_> {
|
|||
| CastKind::PointerExposeAddress
|
||||
| CastKind::PointerFromExposedAddress => {
|
||||
let current_ty = self.operand_ty(operand, locals)?;
|
||||
let is_signed = match current_ty.kind(Interner) {
|
||||
TyKind::Scalar(chalk_ir::Scalar::Int(_)) => true,
|
||||
_ => false,
|
||||
};
|
||||
let is_signed = matches!(
|
||||
current_ty.kind(Interner),
|
||||
TyKind::Scalar(chalk_ir::Scalar::Int(_))
|
||||
);
|
||||
let current = pad16(self.eval_operand(operand, locals)?.get(self)?, is_signed);
|
||||
let dest_size =
|
||||
self.size_of_sized(target_ty, locals, "destination of int to int cast")?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue