提交 03124389 编写于 作者: L lcnr

check for cycles in `default_anon_const_substs`

上级 2140016d
......@@ -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.
//
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册