Skip to content

Commit

Permalink
Remove clone
Browse files Browse the repository at this point in the history
  • Loading branch information
bonega committed Sep 9, 2021
1 parent 5b2f757 commit 459c910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/validity.rs
Expand Up @@ -625,7 +625,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
return Ok(());
}
// At least one value is excluded.
let valid_range = scalar_layout.valid_range.clone();
let valid_range = scalar_layout.valid_range;
let WrappingRange { start, end } = valid_range;
let max_value = u128::MAX >> (128 - op.layout.size.bits());
assert!(end <= max_value);
Expand Down

0 comments on commit 459c910

Please sign in to comment.