Skip to content

Commit

Permalink
Auto merge of #7099 - ABouttefeux:master, r=llogiq
Browse files Browse the repository at this point in the history
add type in help message of from_over_into

fixes #7088
changelog: add type in help message of from_over_into
  • Loading branch information
bors committed Apr 16, 2021
2 parents 831c157 + ccd0f0b commit e441b33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/from_over_into.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/from_over_into.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e441b33

Please sign in to comment.