Fix tidy ```ignore error

tidy error: /git/rust/compiler/rustc_ast_pretty/src/pprust/state.rs:1165: unexplained "```ignore" doctest; try one:

    * make the test actually pass, by adding necessary imports and declarations, or
    * use "```text", if the code is not Rust code, or
    * use "```compile_fail,Ennnn", if the code is expected to fail at compile time, or
    * use "```should_panic", if the code is expected to fail at run time, or
    * use "```no_run", if the code should type-check but not necessary linkable/runnable, or
    * explain it like "```ignore (cannot-test-this-because-xxxx)", if the annotation cannot be avoided.

    tidy error: /git/rust/compiler/rustc_ast_pretty/src/pprust/state.rs:1176: unexplained "```ignore" doctest; try one:

    * make the test actually pass, by adding necessary imports and declarations, or
    * use "```text", if the code is not Rust code, or
    * use "```compile_fail,Ennnn", if the code is expected to fail at compile time, or
    * use "```should_panic", if the code is expected to fail at run time, or
    * use "```no_run", if the code should type-check but not necessary linkable/runnable, or
    * explain it like "```ignore (cannot-test-this-because-xxxx)", if the annotation cannot be avoided.
This commit is contained in:
David Tolnay 2023-12-07 15:16:50 -08:00
parent 6f1d7631fb
commit 8997215a24
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -1162,7 +1162,7 @@ impl<'a> State<'a> {
/// For example each of the following would mean the wrong thing without
/// parentheses.
///
/// ```ignore
/// ```ignore (illustrative)
/// if let _ = (Struct {}) {}
///
/// if let _ = (true && false) {}
@ -1173,7 +1173,7 @@ impl<'a> State<'a> {
/// the match guard expression. Parsing of the expression is not terminated
/// by `{` in that position.
///
/// ```ignore
/// ```ignore (illustrative)
/// match () {
/// () if let _ = Struct {} => {}
/// () if let _ = (true && false) => {}