aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/layout/layout_debug.rs4
-rw-r--r--components/script/script_task.rs2
-rw-r--r--components/util/logical_geometry.rs12
-rw-r--r--components/util/task_state.rs10
4 files changed, 14 insertions, 14 deletions
diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs
index e9e5c585e68..26e62780f92 100644
--- a/components/layout/layout_debug.rs
+++ b/components/layout/layout_debug.rs
@@ -26,7 +26,7 @@ pub struct Scope;
#[macro_export]
macro_rules! layout_debug_scope(
($($arg:tt)*) => (
- if cfg!(not(ndebug)) {
+ if cfg!(debug_assertions) {
layout_debug::Scope::new(format!($($arg)*))
} else {
layout_debug::Scope
@@ -76,7 +76,7 @@ impl Scope {
}
}
-#[cfg(not(ndebug))]
+#[cfg(debug_assertions)]
impl Drop for Scope {
fn drop(&mut self) {
STATE_KEY.with(|ref r| {
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index cad737b4af4..ff13cc12ff0 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -529,7 +529,7 @@ impl ScriptTask {
}
// Needed for debug assertions about whether GC is running.
- if !cfg!(ndebug) {
+ if cfg!(debug_assertions) {
unsafe {
JS_SetGCCallback(runtime.rt(),
Some(debug_gc_callback as unsafe extern "C" fn(*mut JSRuntime, JSGCStatus)));
diff --git a/components/util/logical_geometry.rs b/components/util/logical_geometry.rs
index 8084e28b3c3..a16e3192e00 100644
--- a/components/util/logical_geometry.rs
+++ b/components/util/logical_geometry.rs
@@ -117,17 +117,17 @@ impl Debug for WritingMode {
/// In debug builds only, logical geometry objects store their writing mode
/// (in addition to taking it as a parameter to methods) and check it.
/// In non-debug builds, make this storage zero-size and the checks no-ops.
-#[cfg(ndebug)]
+#[cfg(not(debug_assertions))]
#[derive(RustcEncodable, PartialEq, Eq, Clone, Copy)]
struct DebugWritingMode;
-#[cfg(not(ndebug))]
+#[cfg(debug_assertions)]
#[derive(RustcEncodable, PartialEq, Eq, Clone, Copy)]
struct DebugWritingMode {
mode: WritingMode
}
-#[cfg(ndebug)]
+#[cfg(not(debug_assertions))]
impl DebugWritingMode {
#[inline]
fn check(&self, _other: WritingMode) {}
@@ -141,7 +141,7 @@ impl DebugWritingMode {
}
}
-#[cfg(not(ndebug))]
+#[cfg(debug_assertions)]
impl DebugWritingMode {
#[inline]
fn check(&self, other: WritingMode) {
@@ -160,12 +160,12 @@ impl DebugWritingMode {
}
impl Debug for DebugWritingMode {
- #[cfg(ndebug)]
+ #[cfg(not(debug_assertions))]
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error> {
write!(formatter, "?")
}
- #[cfg(not(ndebug))]
+ #[cfg(debug_assertions)]
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error> {
self.mode.fmt(formatter)
}
diff --git a/components/util/task_state.rs b/components/util/task_state.rs
index 82dffa8ee4a..b816c56038c 100644
--- a/components/util/task_state.rs
+++ b/components/util/task_state.rs
@@ -26,18 +26,18 @@ bitflags! {
macro_rules! task_types ( ( $( $fun:ident = $flag:ident ; )* ) => (
impl TaskState {
$(
- #[cfg(not(ndebug))]
+ #[cfg(debug_assertions)]
pub fn $fun(self) -> bool {
self.contains($flag)
}
- #[cfg(ndebug)]
+ #[cfg(not(debug_assertions))]
pub fn $fun(self) -> bool {
true
}
)*
}
- #[cfg(not(ndebug))]
+ #[cfg(debug_assertions)]
static TYPES: &'static [TaskState]
= &[ $( $flag ),* ];
));
@@ -48,7 +48,7 @@ task_types! {
is_paint = PAINT;
}
-#[cfg(not(ndebug))]
+#[cfg(debug_assertions)]
mod imp {
use super::{TaskState, TYPES};
use std::cell::RefCell;
@@ -96,7 +96,7 @@ mod imp {
}
}
-#[cfg(ndebug)]
+#[cfg(not(debug_assertions))]
mod imp {
use super::TaskState;
#[inline(always)] pub fn initialize(_: TaskState) { }