shrinking the deprecated method span
This commit is contained in:
parent
2d11e25794
commit
f6dd332820
12 changed files with 159 additions and 98 deletions
|
@ -739,7 +739,7 @@ impl Visitor<'tcx> for Checker<'tcx> {
|
|||
None => return,
|
||||
};
|
||||
let def_id = DefId { krate: cnum, index: CRATE_DEF_INDEX };
|
||||
self.tcx.check_stability(def_id, Some(item.hir_id()), item.span);
|
||||
self.tcx.check_stability(def_id, Some(item.hir_id()), item.span, None);
|
||||
}
|
||||
|
||||
// For implementations of traits, check the stability of each item
|
||||
|
@ -783,7 +783,7 @@ impl Visitor<'tcx> for Checker<'tcx> {
|
|||
.map(|item| item.def_id);
|
||||
if let Some(def_id) = trait_item_def_id {
|
||||
// Pass `None` to skip deprecation warnings.
|
||||
self.tcx.check_stability(def_id, None, impl_item.span);
|
||||
self.tcx.check_stability(def_id, None, impl_item.span, None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ 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)
|
||||
self.tcx.check_stability(def_id, Some(id), path.span, None)
|
||||
}
|
||||
intravisit::walk_path(self, path)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue