Skip to content

Commit 23ebee6

Browse files
committed
Fix deprecated stuff so it builds again
1 parent 43a1e5d commit 23ebee6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

macros/src/atom/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn expand_ns(cx: &mut ExtCtxt, sp: Span, tt: &[TokenTree]) -> Box<MacResult+
107107
];
108108

109109
fn usage() -> String {
110-
let ns_names: Vec<&'static str> = ALL_NS.slice_from(1).iter()
110+
let ns_names: Vec<&'static str> = ALL_NS[1..].iter()
111111
.map(|&(x, _)| x).collect();
112112
format!("Usage: ns!(HTML), case-insensitive. \
113113
Known namespaces: {}",

shared/repr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub unsafe fn inline_orig_bytes<'a>(data: &'a u64) -> &'a [u8] {
124124
match UnpackedAtom::from_packed(*data) {
125125
Inline(len, _) => {
126126
let src: &[u8] = mem::transmute(inline_atom_slice(data));
127-
src.slice_to(len as usize)
127+
&src[..(len as usize)]
128128
}
129129
_ => intrinsics::unreachable(),
130130
}

src/atom/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl Drop for Atom {
257257
}
258258
}
259259

260-
impl fmt::Show for Atom {
260+
impl fmt::Debug for Atom {
261261
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
262262
let ty_str = unsafe {
263263
match self.unpack() {

0 commit comments

Comments
 (0)