Created
June 10, 2022 05:57
-
-
Save compiler-errors/4c57979c330d064830b44b74f542770e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler/rustc_typeck/src/astconv/mod.rs b/compiler/rustc_typeck/src/astconv/mod.rs | |
index ab79dcd4161..20b178ca6ad 100644 | |
--- a/compiler/rustc_typeck/src/astconv/mod.rs | |
+++ b/compiler/rustc_typeck/src/astconv/mod.rs | |
@@ -2364,13 +2364,12 @@ pub fn res_to_ty( | |
let substs = self.ast_path_substs_for_ty(span, did, item_segment.0); | |
self.normalize_ty(span, tcx.mk_opaque(did, substs)) | |
} | |
- Res::Def(DefKind::TyAlias, did) => { | |
- let item_segment = path.segments.split_last().unwrap(); | |
- let substs = self.ast_path_substs_for_ty(span, did, item_segment.0); | |
- self.normalize_ty(span, tcx.mk_ty_alias(did, substs)) | |
- } | |
Res::Def( | |
- DefKind::Enum | DefKind::Struct | DefKind::Union | DefKind::ForeignTy, | |
+ DefKind::Enum | |
+ | DefKind::Struct | |
+ | DefKind::Union | |
+ | DefKind::ForeignTy | |
+ | DefKind::TyAlias, | |
did, | |
) => { | |
assert_eq!(opt_self_ty, None); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment