Skip to content

Commit

Permalink
review comment: add HACK comment
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Apr 22, 2019
1 parent 56b1ec0 commit 87ef96d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_mir/hair/pattern/mod.rs
Expand Up @@ -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, \
Expand Down

0 comments on commit 87ef96d

Please sign in to comment.