mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Upgrade Rust.
This commit is contained in:
parent
8b6f62c195
commit
b91e6f30e0
132 changed files with 764 additions and 738 deletions
|
@ -2,10 +2,8 @@
|
|||
* 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/. */
|
||||
|
||||
#![crate_id = "github.com/mozilla/servo#macros:0.1"]
|
||||
#![crate_type = "lib"]
|
||||
#![crate_name = "macros"]
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
|
@ -44,10 +42,10 @@ macro_rules! lazy_init(
|
|||
impl Deref<$T> for $N {
|
||||
fn deref<'a>(&'a self) -> &'a $T {
|
||||
unsafe {
|
||||
static mut s: *$T = 0 as *$T;
|
||||
static mut s: *const $T = 0 as *const $T;
|
||||
static mut ONCE: ::sync::one::Once = ::sync::one::ONCE_INIT;
|
||||
ONCE.doit(|| {
|
||||
s = ::std::mem::transmute::<Box<$T>, *$T>(box () ($e));
|
||||
s = ::std::mem::transmute::<Box<$T>, *const $T>(box () ($e));
|
||||
});
|
||||
&*s
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue