Skip to content

Commit 4a65fdc

Browse files
committed
Rename is_disaligned to is_potentially_disaligned for better semantic clarity
1 parent f0c8e9e commit 4a65fdc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_const_eval/src/util/alignment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn get_element_alignment<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<Align>
7676
ty::Array(element_ty, _) | ty::Slice(element_ty) => {
7777
// For arrays and slices, the alignment is the same as the element type
7878
let param_env = ty::ParamEnv::empty();
79-
let typing_env =
79+
let typing_env =
8080
ty::TypingEnv { typing_mode: ty::TypingMode::non_body_analysis(), param_env };
8181
match tcx.layout_of(typing_env.as_query_input(*element_ty)) {
8282
Ok(layout) => Some(layout.align.abi),

compiler/rustc_mir_transform/src/check_packed_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl<'tcx> Visitor<'tcx> for PackedRefChecker<'_, 'tcx> {
3737
}
3838

3939
fn visit_place(&mut self, place: &Place<'tcx>, context: PlaceContext, _location: Location) {
40-
if context.is_borrow()
40+
if context.is_borrow()
4141
&& util::is_potentially_disaligned(self.tcx, self.body, self.typing_env, *place)
4242
{
4343
let def_id = self.body.source.instance.def_id();

0 commit comments

Comments
 (0)