non_local_defs: use span of the impl def and not the impl block
This commit is contained in:
parent
de1c122950
commit
26b873d030
9 changed files with 79 additions and 180 deletions
|
@ -219,7 +219,7 @@ impl<'tcx> LateLintPass<'tcx> for NonLocalDefinitions {
|
|||
|
||||
cx.emit_span_lint(
|
||||
NON_LOCAL_DEFINITIONS,
|
||||
item.span,
|
||||
item.span.shrink_to_lo().to(impl_.self_ty.span),
|
||||
NonLocalDefinitionsDiag::Impl {
|
||||
depth: self.body_depth,
|
||||
body_kind_descr: cx.tcx.def_kind_descr(parent_def_kind, parent),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue