]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_transform/src/remove_zsts.rs
Auto merge of #106976 - tmiasko:borrowck-lazy-dominators, r=cjgillot
[rust.git] / compiler / rustc_mir_transform / src / remove_zsts.rs
index 569e783fee847b17a561293e001783627773ab9e..6cabef92d8c2190e7f31514eb319eee727dcc9c2 100644 (file)
@@ -52,7 +52,11 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
 fn maybe_zst(ty: Ty<'_>) -> bool {
     match ty.kind() {
         // maybe ZST (could be more precise)
-        ty::Adt(..) | ty::Array(..) | ty::Closure(..) | ty::Tuple(..) | ty::Opaque(..) => true,
+        ty::Adt(..)
+        | ty::Array(..)
+        | ty::Closure(..)
+        | ty::Tuple(..)
+        | ty::Alias(ty::Opaque, ..) => true,
         // definitely ZST
         ty::FnDef(..) | ty::Never => true,
         // unreachable or can't be ZST