Skip to content

Commit

Permalink
Throw compiler error on unsupported platform
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Jun 6, 2022
1 parent 990cc0c commit 04d6993
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions boa_engine/src/value/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,17 @@ use std::mem::ManuallyDrop;
// Ref<'a, T> type

cfg_if::cfg_if! {
if #[cfg(all(target_arch = "x86_64", target_pointer_width = "64", feature = "nan_boxing", not(doc)))] {
#[path = "nan_boxed.rs"]
mod r#impl;
if #[cfg(all(feature = "nan_boxing", not(doc)))] {
cfg_if::cfg_if! {
if #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] {

#[path = "nan_boxed.rs"]
mod r#impl;

} else {
compile_error!("This platform doesn't support NaN-boxing.");
}
}
} else {
#[path = "default.rs"]
mod r#impl;
Expand Down

0 comments on commit 04d6993

Please sign in to comment.