diff options
| author | bors <bors@rust-lang.org> | 2021-08-18 10:43:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-18 10:43:27 +0000 |
| commit | ba8cda2fa2c99ed6646f4dfe73bf4edad7e42a2d (patch) | |
| tree | 7adfa942c13a620d7ea6e0a9c0bb80e4eb5dd480 /compiler/rustc_serialize/src | |
| parent | 896f058f13d6c8021f7637817953a44d3a78be32 (diff) | |
| parent | 0f081832b43db75073db2d8faecc84cf0ea7e271 (diff) | |
Auto merge of #87781 - est31:remove_box, r=oli-obk
Remove box syntax from compiler and tools Removes box syntax from the compiler and tools. In #49733, the future of box syntax is uncertain and the use in the compiler was listed as one of the reasons to keep it. Removal of box syntax [might affect the code generated](https://github.com/rust-lang/rust/pull/49646#issuecomment-379219615) and slow down the compiler so I'd recommend doing a perf run on this.
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)?)) } } |
