@@ -103,7 +103,7 @@ pub(crate) fn run(options: RustdocOptions) -> Result<(), ErrorGuaranteed> {
103
103
diagnostic_output : DiagnosticOutput :: Default ,
104
104
lint_caps,
105
105
parse_sess_created : None ,
106
- register_lints : Some ( box crate :: lint:: register_lints) ,
106
+ register_lints : Some ( Box :: new ( crate :: lint:: register_lints) ) ,
107
107
override_queries : None ,
108
108
make_codegen_backend : None ,
109
109
registry : rustc_driver:: diagnostics_registry ( ) ,
@@ -556,7 +556,7 @@ pub(crate) fn make_test(
556
556
. supports_color ( ) ;
557
557
558
558
let emitter = EmitterWriter :: new (
559
- box io:: sink ( ) ,
559
+ Box :: new ( io:: sink ( ) ) ,
560
560
None ,
561
561
None ,
562
562
fallback_bundle,
@@ -568,7 +568,7 @@ pub(crate) fn make_test(
568
568
) ;
569
569
570
570
// FIXME(misdreavus): pass `-Z treat-err-as-bug` to the doctest parser
571
- let handler = Handler :: with_emitter ( false , None , box emitter) ;
571
+ let handler = Handler :: with_emitter ( false , None , Box :: new ( emitter) ) ;
572
572
let sess = ParseSess :: with_span_handler ( handler, sm) ;
573
573
574
574
let mut found_main = false ;
@@ -1005,7 +1005,7 @@ impl Tester for Collector {
1005
1005
1006
1006
if let Err ( err) = std:: fs:: create_dir_all ( & path) {
1007
1007
eprintln ! ( "Couldn't create directory for doctest executables: {}" , err) ;
1008
- panic:: resume_unwind ( box ( ) ) ;
1008
+ panic:: resume_unwind ( Box :: new ( ( ) ) ) ;
1009
1009
}
1010
1010
1011
1011
DirState :: Perm ( path)
@@ -1034,7 +1034,7 @@ impl Tester for Collector {
1034
1034
no_run,
1035
1035
test_type : test:: TestType :: DocTest ,
1036
1036
} ,
1037
- testfn : test:: DynTestFn ( box move || {
1037
+ testfn : test:: DynTestFn ( Box :: new ( move || {
1038
1038
let report_unused_externs = |uext| {
1039
1039
unused_externs. lock ( ) . unwrap ( ) . push ( uext) ;
1040
1040
} ;
@@ -1105,9 +1105,9 @@ impl Tester for Collector {
1105
1105
}
1106
1106
}
1107
1107
1108
- panic:: resume_unwind ( box ( ) ) ;
1108
+ panic:: resume_unwind ( Box :: new ( ( ) ) ) ;
1109
1109
}
1110
- } ) ,
1110
+ } ) ) ,
1111
1111
} ) ;
1112
1112
}
1113
1113
0 commit comments