Skip to content

Commit dd4cc0c

Browse files
committed
Remove box syntax from rustc_lint
1 parent 99db8fa commit dd4cc0c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

compiler/rustc_lint/src/lib.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#![cfg_attr(test, feature(test))]
3030
#![feature(array_windows)]
3131
#![feature(bool_to_option)]
32-
#![feature(box_syntax)]
3332
#![feature(box_patterns)]
3433
#![feature(crate_visibility_modifier)]
3534
#![feature(format_args_capture)]
@@ -246,7 +245,7 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) {
246245
macro_rules! register_pass {
247246
($method:ident, $ty:ident, $constructor:expr) => {
248247
store.register_lints(&$ty::get_lints());
249-
store.$method(|| box $constructor);
248+
store.$method(|| Box::new($constructor));
250249
};
251250
}
252251

@@ -478,13 +477,13 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) {
478477

479478
fn register_internals(store: &mut LintStore) {
480479
store.register_lints(&LintPassImpl::get_lints());
481-
store.register_early_pass(|| box LintPassImpl);
480+
store.register_early_pass(|| Box::new(LintPassImpl));
482481
store.register_lints(&DefaultHashTypes::get_lints());
483-
store.register_late_pass(|| box DefaultHashTypes);
482+
store.register_late_pass(|| Box::new(DefaultHashTypes));
484483
store.register_lints(&ExistingDocKeyword::get_lints());
485-
store.register_late_pass(|| box ExistingDocKeyword);
484+
store.register_late_pass(|| Box::new(ExistingDocKeyword));
486485
store.register_lints(&TyTyKind::get_lints());
487-
store.register_late_pass(|| box TyTyKind);
486+
store.register_late_pass(|| Box::new(TyTyKind));
488487
store.register_group(
489488
false,
490489
"rustc::internal",

0 commit comments

Comments
 (0)