Remove unnecessary dyn Display in favor of str
This commit is contained in:
parent
c5320454ed
commit
d940038636
5 changed files with 9 additions and 9 deletions
|
@ -967,7 +967,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
format!("...so that the {}", sup_trace.cause.as_requirement_str()),
|
||||
);
|
||||
|
||||
err.note_expected_found(&"", sup_expected, &"", sup_found);
|
||||
err.note_expected_found("", sup_expected, "", sup_found);
|
||||
return if sub_region.is_error() | sup_region.is_error() {
|
||||
err.delay_as_bug()
|
||||
} else {
|
||||
|
|
|
@ -2846,9 +2846,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
// Print type mismatch
|
||||
let (expected_args, given_args) = self.cmp(expected_ty, given_ty);
|
||||
err.note_expected_found(
|
||||
&"a closure with signature",
|
||||
"a closure with signature",
|
||||
expected_args,
|
||||
&"a closure with signature",
|
||||
"a closure with signature",
|
||||
given_args,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -415,7 +415,7 @@ impl Subdiagnostic for RegionOriginNote<'_> {
|
|||
label_or_note(span, fluent::trait_selection_subtype);
|
||||
diag.arg("requirement", requirement);
|
||||
|
||||
diag.note_expected_found(&"", expected, &"", found);
|
||||
diag.note_expected_found("", expected, "", found);
|
||||
}
|
||||
RegionOriginNote::WithRequirement { span, requirement, expected_found: None } => {
|
||||
// FIXME: this really should be handled at some earlier stage. Our
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue