Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Oct 18, 2020
1 parent da0ba2f commit c4ae6c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_mir_build/src/thir/pattern/_match.rs
Expand Up @@ -2113,6 +2113,9 @@ fn pat_constructor<'tcx>(
match value.ty.kind() {
ty::Float(_) => Some(FloatRange(value, value, RangeEnd::Included)),
ty::Ref(_, t, _) if t.is_str() => Some(Str(value)),
// All constants that can be structurally matched have already been expanded
// into the corresponding `Pat`s by `const_to_pat`. Constants that remain are
// opaque.
_ => Some(Opaque),
}
}
Expand Down

0 comments on commit c4ae6c2

Please sign in to comment.