Skip to content

Commit 4f7a378

Browse files
committed
typo
1 parent 079400c commit 4f7a378

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/librustc_mir_build/hair/pattern/_match.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -963,11 +963,12 @@ impl<'p, 'tcx> FilteredField<'p, 'tcx> {
963963
///
964964
/// If a private or `non_exhaustive` field is uninhabited, the code mustn't observe that it is
965965
/// uninhabited. For that, we filter these fields out of the matrix. This is subtle because we
966-
/// still need to have those fields back when going to/from a `Pat`. Mot of this is handled
967-
/// automatically in `Fields`, but when constructing or deconstructing fields you need to use the
968-
/// correct method. As a rule, when going to/from the matrix, use the filtered field list; when
969-
/// going to/from `Pat`, use the full field list.
970-
/// This filtering is uncommon in practice, because uninhabited fields are rarely used.
966+
/// still need to have those fields back when going to/from a `Pat`. Most of this is handled
967+
/// automatically in `Fields`, but when constructing or deconstructing `Fields` you need to be
968+
/// careful. As a rule, when going to/from the matrix, use the filtered field list; when going
969+
/// to/from `Pat`, use the full field list.
970+
/// This filtering is uncommon in practice, because uninhabited fields are rarely used, so we avoid
971+
/// it when possible to preserve performance.
971972
#[derive(Debug, Clone)]
972973
enum Fields<'p, 'tcx> {
973974
/// Lists of patterns that don't contain any filtered fields.

0 commit comments

Comments
 (0)