Provide more of an explanation when using function as pattern #60642
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
(Follow up to #60635 and #60641)
When trying to match on the result of a
fn
call, we emit:We should explain that
fn
calls are not allowed ever in patterns, only refutable (or even irrefutable, as you can match on a struct, although it is silly) types, possibly linking to (or cribbing text from) the appropriate chapter in The Book.The text was updated successfully, but these errors were encountered: