- let mut err = tcx.sess.struct_span_err(
- trait_should_be_self,
- "associated item referring to unboxed trait object for its own trait",
- );
- err.span_label(trait_name.span, "in this trait");
- err.multipart_suggestion(
- "you might have meant to use `Self` to refer to the materialized type",
- sugg,
- Applicability::MachineApplicable,
- );
- err.emit();
+ tcx.sess
+ .struct_span_err(
+ trait_should_be_self,
+ "associated item referring to unboxed trait object for its own trait",
+ )
+ .span_label(trait_name.span, "in this trait")
+ .multipart_suggestion(
+ "you might have meant to use `Self` to refer to the implementing type",
+ sugg,
+ Applicability::MachineApplicable,
+ )
+ .emit();