Skip to content

Commit f71a378

Browse files
committed
Merge pull request #9 from ktossell/rust-20150103
Updated for latest Rust nightly.
2 parents 10499f4 + 8d617be commit f71a378

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lazy_static.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ macro_rules! lazy_static {
8484
};
8585
($VIS:ident static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
8686
lazy_static!(MAKE TY $VIS $N);
87-
impl Deref<$T> for $N {
87+
impl ::std::ops::Deref for $N {
88+
type Target = $T;
8889
fn deref<'a>(&'a self) -> &'a $T {
8990
use std::sync::{Once, ONCE_INIT};
9091
use std::mem::transmute;

tests/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::collections::HashMap;
66

77
lazy_static! {
88
static ref NUMBER: uint = times_two(3);
9-
static ref ARRAY_BOXES: [Box<uint>, ..3] = [box 1, box 2, box 3];
9+
static ref ARRAY_BOXES: [Box<uint>; 3] = [box 1, box 2, box 3];
1010
static ref STRING: String = "hello".to_string();
1111
static ref HASHMAP: HashMap<uint, &'static str> = {
1212
let mut m = HashMap::new();

0 commit comments

Comments
 (0)