Auto merge of #7099 - ABouttefeux:master, r=llogiq

add type in help message of from_over_into

fixes #7088
changelog: add type in help message of from_over_into
This commit is contained in:
bors 2021-04-16 21:22:24 +00:00
commit e441b33ba0
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ impl LateLintPass<'_> for FromOverInto {
cx.tcx.sess.source_map().guess_head_span(item.span),
"an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true",
None,
"consider to implement `From` instead",
&format!("consider to implement `From<{}>` instead", impl_trait_ref.self_ty()),
);
}
}

View File

@ -5,7 +5,7 @@ LL | impl Into<StringWrapper> for String {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::from-over-into` implied by `-D warnings`
= help: consider to implement `From` instead
= help: consider to implement `From<std::string::String>` instead
error: aborting due to previous error