aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/task.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-10-15 01:04:12 +0200
committerSimon Sapin <simon.sapin@exyr.org>2017-10-16 20:20:21 +0200
commit27239e1123303129bb48d976e71bb79aad3fa5e3 (patch)
tree578f1c68260d17f710a42e0adb0fa87651363e69 /components/script/task.rs
parentbffec1c1a1ff55f47e88a2df60bd574b57205aec (diff)
downloadservo-27239e1123303129bb48d976e71bb79aad3fa5e3.tar.gz
servo-27239e1123303129bb48d976e71bb79aad3fa5e3.zip
Make usage of core_intrinsics optional
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);