Skip to content

Commit c24ef46

Browse files
committed
Reformat
1 parent 3d94e25 commit c24ef46

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

compiler/rustc_const_eval/src/interpret/intrinsics/validity_invariants_of.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use rustc_middle::ty::layout::LayoutCx;
66
use rustc_middle::ty::{ParamEnv, ParamEnvAnd};
77
use rustc_middle::ty::{Ty, TyCtxt};
88
use rustc_target::abi::{
9-
Abi, FieldsShape, HasDataLayout, Integer, Primitive, Scalar, Size, TyAndLayout, WrappingRange, Variants,
9+
Abi, FieldsShape, HasDataLayout, Integer, Primitive, Scalar, Size, TyAndLayout, Variants,
10+
WrappingRange,
1011
};
1112

1213
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]

library/core/src/intrinsics.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,11 +2485,17 @@ pub unsafe fn assert_validity_of<T>(value: *const T) -> bool {
24852485

24862486
if start > end {
24872487
if !((start..=max).contains(&value) || (0..=end).contains(&value)) {
2488-
panic!("read value {value} which was not in range 0..={end} or {start}..={max} at offset {off} in type {}", core::any::type_name::<T>());
2488+
panic!(
2489+
"read value {value} which was not in range 0..={end} or {start}..={max} at offset {off} in type {}",
2490+
core::any::type_name::<T>()
2491+
);
24892492
}
24902493
} else {
24912494
if !(start..=end).contains(&value) {
2492-
panic!("read value {value} which was not in range {start}..={end} at offset {off} in type {}", core::any::type_name::<T>());
2495+
panic!(
2496+
"read value {value} which was not in range {start}..={end} at offset {off} in type {}",
2497+
core::any::type_name::<T>()
2498+
);
24932499
}
24942500
}
24952501
}

0 commit comments

Comments
 (0)