Rustup
This commit is contained in:
parent
547d9ca120
commit
28daee4c91
2 changed files with 47 additions and 8 deletions
|
|
@ -342,16 +342,23 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
|
|||
self.record(&None);
|
||||
},
|
||||
TyPath(ref path) => {
|
||||
self.collect_anonymous_lifetimes(path, ty);
|
||||
},
|
||||
TyImplTraitExistential(exist_ty_id, _, _) => {
|
||||
if let ItemExistential(ref exist_ty) = self.cx.tcx.hir.expect_item(exist_ty_id.id).node {
|
||||
for bound in &exist_ty.bounds {
|
||||
if let GenericBound::Outlives(_) = *bound {
|
||||
self.record(&None);
|
||||
if let QPath::Resolved(_, ref path) = *path {
|
||||
if let Def::Existential(def_id) = path.def {
|
||||
let node_id = self.cx.tcx.hir.as_local_node_id(def_id).unwrap();
|
||||
if let ItemExistential(ref exist_ty) = self.cx.tcx.hir.expect_item(node_id).node {
|
||||
for bound in &exist_ty.bounds {
|
||||
if let GenericBound::Outlives(_) = *bound {
|
||||
self.record(&None);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
unreachable!()
|
||||
}
|
||||
walk_ty(self, ty);
|
||||
return;
|
||||
}
|
||||
}
|
||||
self.collect_anonymous_lifetimes(path, ty);
|
||||
}
|
||||
TyTraitObject(ref bounds, ref lt) => {
|
||||
if !lt.is_elided() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue