diff options
Diffstat (limited to 'components/style/gecko_bindings/mod.rs')
-rw-r--r-- | components/style/gecko_bindings/mod.rs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/components/style/gecko_bindings/mod.rs b/components/style/gecko_bindings/mod.rs index 7201bdb2668..d86bfb60484 100644 --- a/components/style/gecko_bindings/mod.rs +++ b/components/style/gecko_bindings/mod.rs @@ -3,22 +3,23 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #[allow(dead_code, improper_ctypes, non_camel_case_types)] -pub mod bindings; +pub mod bindings { + include!(concat!(env!("OUT_DIR"), "/gecko/bindings.rs")); +} // FIXME: We allow `improper_ctypes` (for now), because the lint doesn't allow // foreign structs to have `PhantomData`. We should remove this once the lint // ignores this case. -#[cfg(debug_assertions)] -#[allow(dead_code, improper_ctypes, non_camel_case_types, non_snake_case, non_upper_case_globals)] -pub mod structs { - include!("structs_debug.rs"); -} - -#[cfg(not(debug_assertions))] #[allow(dead_code, improper_ctypes, non_camel_case_types, non_snake_case, non_upper_case_globals)] pub mod structs { - include!("structs_release.rs"); + cfg_if! { + if #[cfg(debug_assertions)] { + include!(concat!(env!("OUT_DIR"), "/gecko/structs_debug.rs")); + } else { + include!(concat!(env!("OUT_DIR"), "/gecko/structs_release.rs")); + } + } } pub mod sugar; |