From 8997215a24f5a2e79e0c329730d525769c5e61c1 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 7 Dec 2023 15:16:50 -0800 Subject: [PATCH] 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. --- compiler/rustc_ast_pretty/src/pprust/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs index 351c2f5835769..ff2cb59211b8c 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state.rs @@ -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) => {}