mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Address comment
This commit is contained in:
parent
c180af8e30
commit
957e2effc3
@ -828,10 +828,9 @@ 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() {
|
||||
let method_span = if path.segments.len() >= 2 {
|
||||
path.segments.last().map(|s| s.ident.span)
|
||||
} else {
|
||||
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user