rustc/ty: move a faster early return up
This commit is contained in:
parent
e153103c38
commit
0ee6b54c24
@ -324,16 +324,16 @@ fn connected_to_root<'tcx>(
|
||||
query: Lrc<QueryJob<'tcx>>,
|
||||
visited: &mut FxHashSet<*const QueryJob<'tcx>>
|
||||
) -> bool {
|
||||
// We already visited this or we're deliberately ignoring it
|
||||
if visited.contains(&query.as_ptr()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This query is connected to the root (it has no query parent), return true
|
||||
if query.parent.is_none() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// We already visited this or we're deliberately ignoring it
|
||||
if visited.contains(&query.as_ptr()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
visited.insert(query.as_ptr());
|
||||
|
||||
let mut connected = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user