Skip to content

Commit 823e6f1

Browse files
committed
Remove box syntax from rustc_serialize
1 parent 395e7df commit 823e6f1

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

compiler/rustc_serialize/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Core encoding and decoding interfaces.
99
html_playground_url = "https://play.rust-lang.org/",
1010
test(attr(allow(unused_variables), deny(warnings)))
1111
)]
12-
#![feature(box_syntax)]
1312
#![feature(never_type)]
1413
#![feature(nll)]
1514
#![feature(associated_type_bounds)]

compiler/rustc_serialize/src/serialize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,6 @@ impl<S: Encoder, T: ?Sized + Encodable<S>> Encodable<S> for Box<T> {
679679
}
680680
impl<D: Decoder, T: Decodable<D>> Decodable<D> for Box<T> {
681681
fn decode(d: &mut D) -> Result<Box<T>, D::Error> {
682-
Ok(box Decodable::decode(d)?)
682+
Ok(Box::new(Decodable::decode(d)?))
683683
}
684684
}

0 commit comments

Comments
 (0)