add type in help of from over Into
This commit is contained in:
parent
1e0a3ff55c
commit
2d050f4b2f
2 changed files with 2 additions and 3 deletions
|
|
@ -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()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue