aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/task.rs')
-rw-r--r--components/script/task.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/task.rs b/components/script/task.rs
index e90fc21c55c..eab786c8c20 100644
--- a/components/script/task.rs
+++ b/components/script/task.rs
@@ -5,7 +5,6 @@
//! Machinery for [tasks](https://html.spec.whatwg.org/multipage/#concept-task).
use std::fmt;
-use std::intrinsics;
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
@@ -33,7 +32,10 @@ macro_rules! task {
pub trait TaskOnce: Send {
#[allow(unsafe_code)]
fn name(&self) -> &'static str {
- unsafe { intrinsics::type_name::<Self>() }
+ #[cfg(feature = "unstable")]
+ unsafe { ::std::intrinsics::type_name::<Self>() }
+ #[cfg(not(feature = "unstable"))]
+ { "(task name unknown)" }
}
fn run_once(self);