Skip to content

Commit c4ae6c2

Browse files
committed
Add comment
1 parent da0ba2f commit c4ae6c2

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_mir_build/src/thir/pattern

1 file changed

+3
-0
lines changed

compiler/rustc_mir_build/src/thir/pattern/_match.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2113,6 +2113,9 @@ fn pat_constructor<'tcx>(
21132113
match value.ty.kind() {
21142114
ty::Float(_) => Some(FloatRange(value, value, RangeEnd::Included)),
21152115
ty::Ref(_, t, _) if t.is_str() => Some(Str(value)),
2116+
// All constants that can be structurally matched have already been expanded
2117+
// into the corresponding `Pat`s by `const_to_pat`. Constants that remain are
2118+
// opaque.
21162119
_ => Some(Opaque),
21172120
}
21182121
}

0 commit comments

Comments
 (0)