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_lint/src/lib.rs | |
| 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_lint/src/lib.rs')
| -rw-r--r-- | compiler/rustc_lint/src/lib.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_lint/src/lib.rs b/compiler/rustc_lint/src/lib.rs index 79f850a781b..0ffcd0154de 100644 --- a/compiler/rustc_lint/src/lib.rs +++ b/compiler/rustc_lint/src/lib.rs @@ -29,7 +29,6 @@ #![cfg_attr(test, feature(test))] #![feature(array_windows)] #![feature(bool_to_option)] -#![feature(box_syntax)] #![feature(box_patterns)] #![feature(crate_visibility_modifier)] #![feature(format_args_capture)] @@ -246,7 +245,7 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) { macro_rules! register_pass { ($method:ident, $ty:ident, $constructor:expr) => { store.register_lints(&$ty::get_lints()); - store.$method(|| box $constructor); + store.$method(|| Box::new($constructor)); }; } @@ -478,13 +477,13 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) { fn register_internals(store: &mut LintStore) { store.register_lints(&LintPassImpl::get_lints()); - store.register_early_pass(|| box LintPassImpl); + store.register_early_pass(|| Box::new(LintPassImpl)); store.register_lints(&DefaultHashTypes::get_lints()); - store.register_late_pass(|| box DefaultHashTypes); + store.register_late_pass(|| Box::new(DefaultHashTypes)); store.register_lints(&ExistingDocKeyword::get_lints()); - store.register_late_pass(|| box ExistingDocKeyword); + store.register_late_pass(|| Box::new(ExistingDocKeyword)); store.register_lints(&TyTyKind::get_lints()); - store.register_late_pass(|| box TyTyKind); + store.register_late_pass(|| Box::new(TyTyKind)); store.register_group( false, "rustc::internal", |
