shrinking the deprecated method span
This commit is contained in:
parent
d74b36ea2f
commit
636d872452
8 changed files with 166 additions and 127 deletions
|
@ -828,7 +828,11 @@ impl Visitor<'tcx> for Checker<'tcx> {
|
|||
|
||||
fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, id: hir::HirId) {
|
||||
if let Some(def_id) = path.res.opt_def_id() {
|
||||
self.tcx.check_stability(def_id, Some(id), path.span, None)
|
||||
let method_span = match path.segments {
|
||||
[.., _, last] => Some(last.ident.span),
|
||||
_ => None,
|
||||
};
|
||||
self.tcx.check_stability(def_id, Some(id), path.span, method_span)
|
||||
}
|
||||
intravisit::walk_path(self, path)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue