Skip to content

Commit

Permalink
Remove box syntax from rustc_serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Aug 18, 2021
1 parent 395e7df commit 823e6f1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion compiler/rustc_serialize/src/lib.rs
Expand Up @@ -9,7 +9,6 @@ Core encoding and decoding interfaces.
html_playground_url = "https://play.rust-lang.org/",
test(attr(allow(unused_variables), deny(warnings)))
)]
#![feature(box_syntax)]
#![feature(never_type)]
#![feature(nll)]
#![feature(associated_type_bounds)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_serialize/src/serialize.rs
Expand Up @@ -679,6 +679,6 @@ impl<S: Encoder, T: ?Sized + Encodable<S>> Encodable<S> for Box<T> {
}
impl<D: Decoder, T: Decodable<D>> Decodable<D> for Box<T> {
fn decode(d: &mut D) -> Result<Box<T>, D::Error> {
Ok(box Decodable::decode(d)?)
Ok(Box::new(Decodable::decode(d)?))
}
}

0 comments on commit 823e6f1

Please sign in to comment.