Ensure no one constructs AliasTy
s themselves
This commit is contained in:
parent
4ffe3bdf99
commit
a5cd3bde95
50 changed files with 104 additions and 106 deletions
|
@ -241,7 +241,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
|
|||
};
|
||||
|
||||
let kind = match parent_ty.ty.kind() {
|
||||
&ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs }) => {
|
||||
&ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs, .. }) => {
|
||||
self.tcx.bound_type_of(def_id).subst(self.tcx, substs).kind()
|
||||
}
|
||||
kind => kind,
|
||||
|
|
|
@ -58,7 +58,7 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
|
|||
// Types with identity (print the module path).
|
||||
ty::Adt(ty::AdtDef(Interned(&ty::AdtDefData { did: def_id, .. }, _)), substs)
|
||||
| ty::FnDef(def_id, substs)
|
||||
| ty::Alias(_, ty::AliasTy { def_id, substs })
|
||||
| ty::Alias(_, ty::AliasTy { def_id, substs, .. })
|
||||
| ty::Closure(def_id, substs)
|
||||
| ty::Generator(def_id, substs, _) => self.print_def_path(def_id, substs),
|
||||
ty::Foreign(def_id) => self.print_def_path(def_id, &[]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue