]> git.lizzy.rs Git - rust.git/commitdiff
review comment: add HACK comment
authorEsteban Küber <esteban@kuber.com.ar>
Mon, 22 Apr 2019 20:14:43 +0000 (13:14 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Mon, 22 Apr 2019 20:14:43 +0000 (13:14 -0700)
src/librustc_mir/hair/pattern/mod.rs

index aff9d7b8eb0dbf14d0be36af47fcdac769330a78..e354ec3e0baf02e93017bab7a2f6d38da13e6ca0 100644 (file)
@@ -986,6 +986,8 @@ fn const_to_pat(
             }
             ty::Ref(_, ty::TyS { sty: ty::Adt(adt_def, _), .. }, _)
             if !self.tcx.has_attr(adt_def.did, "structural_match") => {
+                // HACK(estebank): Side-step ICE #53708, but anything other than erroring here
+                // would be wrong. Returnging `PatternKind::Wild` is not technically correct.
                 let path = self.tcx.def_path_str(adt_def.did);
                 let msg = format!(
                     "to use a constant of type `{}` in a pattern, \