Skip to content

Commit 05d67e5

Browse files
authored
Merge pull request #2801 from malezjaa/new-on-unimplemented-match-values
new rustc_on_unimplemented match values
2 parents 6f62d4d + a7ca8e4 commit 05d67e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/diagnostics.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@ The compiler can provide several values to match on, for example:
964964
- references to said slices and arrays.
965965
- `"fn"`, `"unsafe fn"` or `"#[target_feature] fn"` when self is a function.
966966
- `"{integer}"` and `"{float}"` if the type is a number but we haven't inferred it yet.
967+
- `"{struct}"`, `"{enum}"` and `"{union}"` to match self as an ADT
967968
- combinations of the above, like `"[{integral}; _]"`.
968969

969970
For example, the `Iterator` trait can be filtered in the following way:

0 commit comments

Comments
 (0)