Auto merge of #85617 - hi-rustin:rustin-patch-fix, r=estebank
shrinking the deprecated method span part of https://github.com/rust-lang/rust/issues/85403 r? `@estebank`
This commit is contained in:
commit
cc77ba46fc
7 changed files with 163 additions and 131 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