Skip to content

Commit 0e42280

Browse files
committed
Remove box syntax from rustc_lint
1 parent 593b86d commit 0e42280

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)]
@@ -245,7 +244,7 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) {
245244
macro_rules! register_pass {
246245
($method:ident, $ty:ident, $constructor:expr) => {
247246
store.register_lints(&$ty::get_lints());
248-
store.$method(|| box $constructor);
247+
store.$method(|| Box::new($constructor));
249248
};
250249
}
251250

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

478477
fn register_internals(store: &mut LintStore) {
479478
store.register_lints(&LintPassImpl::get_lints());
480-
store.register_early_pass(|| box LintPassImpl);
479+
store.register_early_pass(|| Box::new(LintPassImpl));
481480
store.register_lints(&DefaultHashTypes::get_lints());
482-
store.register_late_pass(|| box DefaultHashTypes);
481+
store.register_late_pass(|| Box::new(DefaultHashTypes));
483482
store.register_lints(&ExistingDocKeyword::get_lints());
484-
store.register_late_pass(|| box ExistingDocKeyword);
483+
store.register_late_pass(|| Box::new(ExistingDocKeyword));
485484
store.register_lints(&TyTyKind::get_lints());
486-
store.register_late_pass(|| box TyTyKind);
485+
store.register_late_pass(|| Box::new(TyTyKind));
487486
store.register_group(
488487
false,
489488
"rustc::internal",

0 commit comments

Comments
 (0)