Because of this pull request to the Rust lang, https://rust-lang.github.io/rfcs/2086-allow-if-let-irrefutables.html the chapter's claim that irrefutable patterns are not allowed in while let and if let statements is no longer true.