Skip to content

Commit 6a7106c

Browse files
committed
type_of AnonConst AssocTy does not require parent
1 parent 645fedd commit 6a7106c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/librustc_typeck/collect/type_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
259259
// default to the path resolution.
260260
let res = segment.res.filter(|&r| r != Res::Err).unwrap_or(path.res);
261261
let generics = match res {
262-
Res::Def(DefKind::Ctor(..) | DefKind::AssocTy, def_id) => {
262+
Res::Def(DefKind::Ctor(..), def_id) => {
263263
tcx.generics_of(tcx.parent(def_id).unwrap())
264264
}
265265
Res::Def(_, def_id) => tcx.generics_of(def_id),

0 commit comments

Comments
 (0)