+ let mut multi_span: MultiSpan = vec![*span].into();
+ multi_span.push_span_label(
+ *span,
+ "this trait object has an implicit `'static` lifetime requirement"
+ .to_string(),
+ );
+ multi_span.push_span_label(
+ method.span,
+ "the `'static` requirement is introduced when calling this method"
+ .to_string(),
+ );
+ err.span_note(
+ multi_span,
+ &format!(
+ "when using method `{}` of trait `{}` on `{}`, an implicit `'static` \
+ requirement is introduced",
+ method,
+ tcx.def_path_str(container_id),
+ tcx.def_path_str(*found_did),
+ ),
+ );