diff options
| author | est31 <MTest31@outlook.com> | 2021-08-05 04:53:51 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2021-08-18 09:25:26 +0200 |
| commit | 823e6f161a977030b9350078e08088a1888eaec4 (patch) | |
| tree | 5c825a593fef67eb2db16857db47789e9b0a3305 /compiler/rustc_serialize/src | |
| parent | 395e7dfc2a0bb20f7b56217d304b8df8e24cb6a1 (diff) | |
| download | rust-823e6f161a977030b9350078e08088a1888eaec4.tar.gz rust-823e6f161a977030b9350078e08088a1888eaec4.zip | |
Remove box syntax from rustc_serialize
Diffstat (limited to 'compiler/rustc_serialize/src')
| -rw-r--r-- | compiler/rustc_serialize/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_serialize/src/serialize.rs | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_serialize/src/lib.rs b/compiler/rustc_serialize/src/lib.rs index c79786a839f..b31fbab20ac 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -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)] diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs index bb3c537ef19..4d9aaaecec8 100644 --- a/compiler/rustc_serialize/src/serialize.rs +++ b/compiler/rustc_serialize/src/serialize.rs @@ -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)?)) } } |
