diff options
| author | Ralf Jung <post@ralfj.de> | 2022-05-19 20:34:37 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-05-19 20:34:37 +0200 |
| commit | 4bb152c4bc5ff5b89e8b3c35908a5ad23e3527fe (patch) | |
| tree | b35f9be4e154a758351578fd94067ab0b88f4c79 /compiler | |
| parent | 42a91ed70c26ad956623bd65a2075d540bd8bd3c (diff) | |
| download | rust-4bb152c4bc5ff5b89e8b3c35908a5ad23e3527fe.tar.gz rust-4bb152c4bc5ff5b89e8b3c35908a5ad23e3527fe.zip | |
fmt
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/validity.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 32d189ffd31..b39a33aff09 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -547,8 +547,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' if M::enforce_number_no_provenance(self.ecx) { // As a special exception we *do* match on a `Scalar` here, since we truly want // to know its underlying representation (and *not* cast it to an integer). - let is_ptr = - value.check_init().map_or(false, |v| matches!(v, Scalar::Ptr(..))); + let is_ptr = value.check_init().map_or(false, |v| matches!(v, Scalar::Ptr(..))); if is_ptr { throw_validation_failure!(self.path, { "{:x}", value } expected { "plain (non-pointer) bytes" } |
