diff options
| author | bors <bors@rust-lang.org> | 2021-04-16 21:22:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-16 21:22:24 +0000 |
| commit | e441b33ba00d897fff4479513210d41f988dfde3 (patch) | |
| tree | 2a7e1f606099aab977893ab56f04b93366859bea | |
| parent | 831c15737c9de9c7f17b1b8aaeb80194a5f19618 (diff) | |
| parent | ccd0f0b4af77e7bb1aaf214852f4c4d7e6d6b60d (diff) | |
| download | rust-e441b33ba00d897fff4479513210d41f988dfde3.tar.gz rust-e441b33ba00d897fff4479513210d41f988dfde3.zip | |
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
| -rw-r--r-- | clippy_lints/src/from_over_into.rs | 2 | ||||
| -rw-r--r-- | tests/ui/from_over_into.stderr | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/from_over_into.rs b/clippy_lints/src/from_over_into.rs index e5ec245e502..5e2baba8943 100644 --- a/clippy_lints/src/from_over_into.rs +++ b/clippy_lints/src/from_over_into.rs @@ -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()), ); } } diff --git a/tests/ui/from_over_into.stderr b/tests/ui/from_over_into.stderr index b101d2704fb..2951e6bdac4 100644 --- a/tests/ui/from_over_into.stderr +++ b/tests/ui/from_over_into.stderr @@ -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 |
