You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem:
The book currently states that using an irrefutable pattern with an "if let" will cause the compiler to give an error: "This code is perfectly valid, although it means we cannot use an irrefutable pattern without receiving an error." However, this behavior was changed (in rust-lang/rust#44495) so that a warning is now produced.
Suggested fix:
From the above sentence, change "will cause the compiler to give an error" to "will cause the compiler to give a warning".
The text was updated successfully, but these errors were encountered:
I have searched open and closed issues and pull requests for duplicates, using these search terms:
" chapter 18.2"
"irrefutable patterns"
I have checked the latest
main
branch to see if this has already been fixed, in this file:Yes
URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/book/ch18-02-refutability.html
Description of the problem:
The book currently states that using an irrefutable pattern with an "if let" will cause the compiler to give an error: "This code is perfectly valid, although it means we cannot use an irrefutable pattern without receiving an error." However, this behavior was changed (in rust-lang/rust#44495) so that a warning is now produced.
Suggested fix:
From the above sentence, change "will cause the compiler to give an error" to "will cause the compiler to give a warning".
The text was updated successfully, but these errors were encountered: