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
|
@ -1440,7 +1440,7 @@ fn opaque_type_cycle_error(tcx: TyCtxt<'_>, def_id: LocalDefId, span: Span) -> E
|
|||
impl<'tcx> ty::visit::TypeVisitor<'tcx> for OpaqueTypeCollector {
|
||||
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
|
||||
match *t.kind() {
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id: def, substs: _ }) => {
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id: def, .. }) => {
|
||||
self.0.push(def);
|
||||
ControlFlow::CONTINUE
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue