We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1eb300e commit 3ef9dfdCopy full SHA for 3ef9dfd
compiler/rustc_middle/src/ty/consts/int.rs
@@ -165,9 +165,8 @@ impl ScalarInt {
165
}
166
167
/// Make sure the `data` fits in `size`.
168
- /// This is guaranteed by all constructors here, but since the enum variants are public,
169
- /// it could still be violated (even though no code outside this file should
170
- /// construct `Scalar`s).
+ /// This is guaranteed by all constructors here, but having had this check saved us from
+ /// bugs many times in the past, so keeping it around is definitely worth it.
171
#[inline(always)]
172
fn check_data(self) {
173
// Using a block `{self.data}` here to force a copy instead of using `self.data`
0 commit comments