-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Description
- I have searched open and closed issues and pull requests for duplicates, using these search terms:
- ch19-02
- I have checked the latest
main
branch to see if this has already been fixed, in this file:ch19-02-refutability.md
URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/book/ch19-02-refutability.html#listing-19-10
Description of the problem:
The lines above this listing describe that the Listing uses if let
that should be giving a warning because they are putting an irrefutable pattern in, but the listing uses let
.
Suggested fix:
listing 19-10 should be changed to
fn main() {
// ANCHOR: here
if let x = 5 else {
return;
};
// ANCHOR_END: here
}
Metadata
Metadata
Assignees
Labels
No labels