check for cycles in default_anon_const_substs
This commit is contained in:
parent
2140016d6c
commit
031243898e
1 changed files with 5 additions and 0 deletions
|
|
@ -275,6 +275,11 @@ fn get_path_containing_arg_in_pat<'hir>(
|
|||
}
|
||||
|
||||
pub(super) fn default_anon_const_substs(tcx: TyCtxt<'_>, def_id: DefId) -> SubstsRef<'_> {
|
||||
let generics = tcx.generics_of(def_id);
|
||||
if let Some(parent) = generics.parent {
|
||||
let _cycle_check = tcx.predicates_of(parent);
|
||||
}
|
||||
|
||||
let substs = InternalSubsts::identity_for_item(tcx, def_id);
|
||||
// We only expect substs with the following type flags as default substs.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue