disable size asserts in the compiler when randomizing layouts
This commit is contained in:
parent
f3bc08adbd
commit
5bf8eeb9f3
8 changed files with 24 additions and 0 deletions
|
@ -40,5 +40,6 @@ tracing = "0.1"
|
|||
|
||||
[features]
|
||||
# tidy-alphabetical-start
|
||||
rustc_randomized_layouts = []
|
||||
rustc_use_parallel_compiler = ["dep:rustc-rayon-core"]
|
||||
# tidy-alphabetical-end
|
||||
|
|
|
@ -337,6 +337,7 @@ macro_rules! define_callbacks {
|
|||
// Ensure that values grow no larger than 64 bytes by accident.
|
||||
// Increase this limit if necessary, but do try to keep the size low if possible
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[cfg(not(feature = "rustc_randomized_layouts"))]
|
||||
const _: () = {
|
||||
if mem::size_of::<Value<'static>>() > 64 {
|
||||
panic!("{}", concat!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue