From 87ef96d3946ed4add766c0a2cd72d8443e92e4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Mon, 22 Apr 2019 13:14:43 -0700 Subject: [PATCH] review comment: add HACK comment --- src/librustc_mir/hair/pattern/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustc_mir/hair/pattern/mod.rs b/src/librustc_mir/hair/pattern/mod.rs index aff9d7b8eb0..e354ec3e0ba 100644 --- a/src/librustc_mir/hair/pattern/mod.rs +++ b/src/librustc_mir/hair/pattern/mod.rs @@ -986,6 +986,8 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> { } 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, \