mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
ea73c8efac
commit
00b6210519
41 changed files with 370 additions and 375 deletions
|
@ -10,12 +10,12 @@ path = "lib.rs"
|
|||
|
||||
[features]
|
||||
# servo as opposed to geckolib
|
||||
servo = ["serde", "serde_macros", "backtrace", "ipc-channel", "bitflags"]
|
||||
servo = ["serde", "serde_macros", "backtrace", "ipc-channel"]
|
||||
|
||||
[dependencies]
|
||||
app_units = {version = "0.2.3"}
|
||||
backtrace = {version = "0.2.1", optional = true}
|
||||
bitflags = {version = "0.7", optional = true}
|
||||
bitflags = "0.7"
|
||||
deque = "0.3.1"
|
||||
euclid = {version = "0.6.4"}
|
||||
getopts = "0.2.11"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
extern crate app_units;
|
||||
#[cfg(feature = "servo")] extern crate backtrace;
|
||||
#[cfg(feature = "servo")] #[allow(unused_extern_crates)] #[macro_use] extern crate bitflags;
|
||||
#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags;
|
||||
extern crate deque;
|
||||
extern crate euclid;
|
||||
extern crate getopts;
|
||||
|
@ -46,12 +46,12 @@ pub mod prefs;
|
|||
#[cfg(feature = "servo")] pub mod print_tree;
|
||||
pub mod resource_files;
|
||||
pub mod str;
|
||||
#[cfg(feature = "servo")] pub mod thread;
|
||||
#[cfg(feature = "servo")] pub mod thread_state;
|
||||
pub mod thread;
|
||||
pub mod thread_state;
|
||||
pub mod tid;
|
||||
#[cfg(feature = "servo")] pub mod time;
|
||||
pub mod vec;
|
||||
#[cfg(feature = "servo")] #[allow(unsafe_code)] pub mod workqueue;
|
||||
#[allow(unsafe_code)] pub mod workqueue;
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
#[allow(unsafe_code)]
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue