]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/from_over_into.rs
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / clippy_lints / src / from_over_into.rs
index 1e7e5f53cc2a35dcbcaf2b6586871e52445ed158..b010abda24d108f35752b6edc602e8a86c185654 100644 (file)
@@ -70,7 +70,7 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
                 span_lint_and_help(
                     cx,
                     FROM_OVER_INTO,
-                    item.span,
+                    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",