Skip to content

Commit 5b20c6a

Browse files
committed
Recursive types are always non-empty
1 parent f1bdd4f commit 5b20c6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/ty/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ impl<'a, 'gcx, 'tcx> AdtDefData<'tcx, 'static> {
13971397
cx: TyCtxt<'a, 'gcx, 'tcx>,
13981398
substs: &'tcx Substs<'tcx>) -> bool {
13991399
match visited.entry((self.did, substs)) {
1400-
hash_map::Entry::Occupied(_) => return true,
1400+
hash_map::Entry::Occupied(_) => return false,
14011401
hash_map::Entry::Vacant(ve) => ve.insert(()),
14021402
};
14031403
self.variants.iter().all(|v| v.is_uninhabited_recurse(visited, cx, substs, self.is_union()))

0 commit comments

Comments
 (0)