Skip to content

Commit 4aafec1

Browse files
committed
Rename inihibit_union_abi_opt() to inihibits_union_abi_opt()
The present tense makes it read more naturally at use site i.e. "this repr _inhibits_ optimizations"
1 parent 6acb9e7 commit 4aafec1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_abi/src/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ pub trait LayoutCalculator {
251251
// If all the non-ZST fields have the same ABI and union ABI optimizations aren't
252252
// disabled, we can use that common ABI for the union as a whole.
253253
struct AbiMismatch;
254-
let mut common_non_zst_abi_and_align = if repr.inhibit_union_abi_opt() {
254+
let mut common_non_zst_abi_and_align = if repr.inhibits_union_abi_opt() {
255255
// Can't optimize
256256
Err(AbiMismatch)
257257
} else {

compiler/rustc_abi/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl ReprOptions {
155155
}
156156

157157
/// Returns `true` if this `#[repr()]` should inhibit union ABI optimisations.
158-
pub fn inhibit_union_abi_opt(&self) -> bool {
158+
pub fn inhibits_union_abi_opt(&self) -> bool {
159159
self.c()
160160
}
161161
}

0 commit comments

Comments
 (0)