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"
This commit is contained in:
parent
6acb9e75eb
commit
4aafec1bc1
2 changed files with 2 additions and 2 deletions
|
@ -251,7 +251,7 @@ pub trait LayoutCalculator {
|
||||||
// If all the non-ZST fields have the same ABI and union ABI optimizations aren't
|
// If all the non-ZST fields have the same ABI and union ABI optimizations aren't
|
||||||
// disabled, we can use that common ABI for the union as a whole.
|
// disabled, we can use that common ABI for the union as a whole.
|
||||||
struct AbiMismatch;
|
struct AbiMismatch;
|
||||||
let mut common_non_zst_abi_and_align = if repr.inhibit_union_abi_opt() {
|
let mut common_non_zst_abi_and_align = if repr.inhibits_union_abi_opt() {
|
||||||
// Can't optimize
|
// Can't optimize
|
||||||
Err(AbiMismatch)
|
Err(AbiMismatch)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -155,7 +155,7 @@ impl ReprOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if this `#[repr()]` should inhibit union ABI optimisations.
|
/// Returns `true` if this `#[repr()]` should inhibit union ABI optimisations.
|
||||||
pub fn inhibit_union_abi_opt(&self) -> bool {
|
pub fn inhibits_union_abi_opt(&self) -> bool {
|
||||||
self.c()
|
self.c()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue