fix review
This commit is contained in:
parent
c75c4a579b
commit
08b1e8004b
9 changed files with 64 additions and 70 deletions
|
@ -349,7 +349,7 @@ fn report_negative_positive_conflict(
|
|||
E0751,
|
||||
"found both positive and negative implementation of trait `{}`{}:",
|
||||
overlap.trait_desc,
|
||||
overlap.self_desc.clone().map_or_else(|| String::new(), |ty| format!(" for type `{}`", ty))
|
||||
overlap.self_desc.clone().map_or_else(String::new, |ty| format!(" for type `{}`", ty))
|
||||
);
|
||||
|
||||
match tcx.span_of_impl(negative_impl_def_id) {
|
||||
|
@ -400,7 +400,7 @@ fn report_conflicting_impls(
|
|||
overlap
|
||||
.self_desc
|
||||
.clone()
|
||||
.map_or_else(|| String::new(), |ty| { format!(" for type `{}`", ty) }),
|
||||
.map_or_else(String::new, |ty| { format!(" for type `{}`", ty) }),
|
||||
match used_to_be_allowed {
|
||||
Some(FutureCompatOverlapErrorKind::Issue33140) => " (E0119)",
|
||||
_ => "",
|
||||
|
@ -418,9 +418,7 @@ fn report_conflicting_impls(
|
|||
impl_span,
|
||||
format!(
|
||||
"conflicting implementation{}",
|
||||
overlap
|
||||
.self_desc
|
||||
.map_or_else(|| String::new(), |ty| format!(" for `{}`", ty))
|
||||
overlap.self_desc.map_or_else(String::new, |ty| format!(" for `{}`", ty))
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue