File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ impl LateLintPass<'_> for FromOverInto {
7070 span_lint_and_help(
7171 cx,
7272 FROM_OVER_INTO ,
73- item. span,
73+ cx . tcx . sess . source_map ( ) . guess_head_span ( item. span) ,
7474 "an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true" ,
7575 None ,
7676 "consider to implement `From` instead" ,
Original file line number Diff line number Diff line change 11error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
22 --> $DIR/from_over_into.rs:6:1
33 |
4- LL | / impl Into<StringWrapper> for String {
5- LL | | fn into(self) -> StringWrapper {
6- LL | | StringWrapper(self)
7- LL | | }
8- LL | | }
9- | |_^
4+ LL | impl Into<StringWrapper> for String {
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106 |
117 = note: `-D clippy::from-over-into` implied by `-D warnings`
128 = help: consider to implement `From` instead
You can’t perform that action at this time.
0 commit comments