Make the style crate almost build on stable Rust.

`discriminant_value` will need to be replaced with something else later.
This commit is contained in:
Simon Sapin 2016-06-21 17:35:26 +02:00
parent ea73c8efac
commit 00b6210519
41 changed files with 370 additions and 375 deletions

View file

@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use backtrace::Backtrace;
use ipc_channel::ipc::IpcSender;
use panicking;
use serde::Serialize;
use std::any::Any;
#[cfg(feature = "servo")] use backtrace::Backtrace;
#[cfg(feature = "servo")] use ipc_channel::ipc::IpcSender;
#[cfg(feature = "servo")] use panicking;
#[cfg(feature = "servo")] use serde::Serialize;
#[cfg(feature = "servo")] use std::any::Any;
#[cfg(feature = "servo")] use thread_state;
use std::thread;
use thread_state;
pub fn spawn_named<F>(name: String, f: F)
where F: FnOnce() + Send + 'static
@ -17,6 +17,7 @@ pub fn spawn_named<F>(name: String, f: F)
}
/// Arrange to send a particular message to a channel if the thread fails.
#[cfg(feature = "servo")]
pub fn spawn_named_with_send_on_panic<F, Id>(name: String,
state: thread_state::ThreadState,
f: F,