@@ -56,23 +56,23 @@ pub trait CodegenBackend {
56
56
fn print_version ( & self ) { }
57
57
fn diagnostics ( & self ) -> & [ ( & ' static str , & ' static str ) ] { & [ ] }
58
58
59
- fn metadata_loader ( & self ) -> Box < MetadataLoader + Sync > ;
59
+ fn metadata_loader ( & self ) -> Box < dyn MetadataLoader + Sync > ;
60
60
fn provide ( & self , _providers : & mut Providers ) ;
61
61
fn provide_extern ( & self , _providers : & mut Providers ) ;
62
62
fn codegen_crate < ' a , ' tcx > (
63
63
& self ,
64
64
tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
65
- rx : mpsc:: Receiver < Box < Any + Send > >
66
- ) -> Box < Any > ;
65
+ rx : mpsc:: Receiver < Box < dyn Any + Send > >
66
+ ) -> Box < dyn Any > ;
67
67
68
- /// This is called on the returned `Box<Any>` from `codegen_backend`
68
+ /// This is called on the returned `Box<dyn Any>` from `codegen_backend`
69
69
///
70
70
/// # Panics
71
71
///
72
- /// Panics when the passed `Box<Any>` was not returned by `codegen_backend`.
72
+ /// Panics when the passed `Box<dyn Any>` was not returned by `codegen_backend`.
73
73
fn join_codegen_and_link (
74
74
& self ,
75
- ongoing_codegen : Box < Any > ,
75
+ ongoing_codegen : Box < dyn Any > ,
76
76
sess : & Session ,
77
77
dep_graph : & DepGraph ,
78
78
outputs : & OutputFilenames ,
@@ -105,7 +105,7 @@ pub struct OngoingCodegen {
105
105
}
106
106
107
107
impl MetadataOnlyCodegenBackend {
108
- pub fn new ( ) -> Box < CodegenBackend > {
108
+ pub fn new ( ) -> Box < dyn CodegenBackend > {
109
109
box MetadataOnlyCodegenBackend ( ( ) )
110
110
}
111
111
}
@@ -125,7 +125,7 @@ impl CodegenBackend for MetadataOnlyCodegenBackend {
125
125
}
126
126
}
127
127
128
- fn metadata_loader ( & self ) -> Box < MetadataLoader + Sync > {
128
+ fn metadata_loader ( & self ) -> Box < dyn MetadataLoader + Sync > {
129
129
box NoLlvmMetadataLoader
130
130
}
131
131
@@ -145,8 +145,8 @@ impl CodegenBackend for MetadataOnlyCodegenBackend {
145
145
fn codegen_crate < ' a , ' tcx > (
146
146
& self ,
147
147
tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
148
- _rx : mpsc:: Receiver < Box < Any + Send > >
149
- ) -> Box < Any > {
148
+ _rx : mpsc:: Receiver < Box < dyn Any + Send > >
149
+ ) -> Box < dyn Any > {
150
150
use rustc_mir:: monomorphize:: item:: MonoItem ;
151
151
152
152
:: check_for_rustc_errors_attr ( tcx) ;
@@ -193,13 +193,13 @@ impl CodegenBackend for MetadataOnlyCodegenBackend {
193
193
194
194
fn join_codegen_and_link (
195
195
& self ,
196
- ongoing_codegen : Box < Any > ,
196
+ ongoing_codegen : Box < dyn Any > ,
197
197
sess : & Session ,
198
198
_dep_graph : & DepGraph ,
199
199
outputs : & OutputFilenames ,
200
200
) -> Result < ( ) , CompileIncomplete > {
201
201
let ongoing_codegen = ongoing_codegen. downcast :: < OngoingCodegen > ( )
202
- . expect ( "Expected MetadataOnlyCodegenBackend's OngoingCodegen, found Box<Any>" ) ;
202
+ . expect ( "Expected MetadataOnlyCodegenBackend's OngoingCodegen, found Box<dyn Any>" ) ;
203
203
for & crate_type in sess. opts . crate_types . iter ( ) {
204
204
if crate_type != CrateType :: CrateTypeRlib && crate_type != CrateType :: CrateTypeDylib {
205
205
continue ;
0 commit comments