88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11+ #![ deny( bare_trait_objects) ]
12+
1113#![ doc( html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" ,
1214 html_favicon_url = "https://doc.rust-lang.org/favicon.ico" ,
1315 html_root_url = "https://doc.rust-lang.org/nightly/" ) ]
@@ -110,7 +112,7 @@ pub struct SubstitutionPart {
110112 pub snippet : String ,
111113}
112114
113- pub type CodeMapperDyn = CodeMapper + sync:: Send + sync:: Sync ;
115+ pub type CodeMapperDyn = dyn CodeMapper + sync:: Send + sync:: Sync ;
114116
115117pub trait CodeMapper {
116118 fn lookup_char_pos ( & self , pos : BytePos ) -> Loc ;
@@ -270,7 +272,7 @@ pub struct Handler {
270272 pub flags : HandlerFlags ,
271273
272274 err_count : AtomicUsize ,
273- emitter : Lock < Box < Emitter + sync:: Send > > ,
275+ emitter : Lock < Box < dyn Emitter + sync:: Send > > ,
274276 continue_after_error : LockCell < bool > ,
275277 delayed_span_bug : Lock < Option < Diagnostic > > ,
276278
@@ -326,7 +328,7 @@ impl Handler {
326328
327329 pub fn with_emitter ( can_emit_warnings : bool ,
328330 treat_err_as_bug : bool ,
329- e : Box < Emitter + sync:: Send > )
331+ e : Box < dyn Emitter + sync:: Send > )
330332 -> Handler {
331333 Handler :: with_emitter_and_flags (
332334 e,
@@ -337,7 +339,8 @@ impl Handler {
337339 } )
338340 }
339341
340- pub fn with_emitter_and_flags ( e : Box < Emitter + sync:: Send > , flags : HandlerFlags ) -> Handler {
342+ pub fn with_emitter_and_flags ( e : Box < dyn Emitter + sync:: Send > , flags : HandlerFlags ) -> Handler
343+ {
341344 Handler {
342345 flags,
343346 err_count : AtomicUsize :: new ( 0 ) ,
0 commit comments