Skip to content

Commit 5a9be48

Browse files
committed
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.
1 parent a7988ff commit 5a9be48

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_ast_pretty/src/pprust

1 file changed

+2
-2
lines changed

compiler/rustc_ast_pretty/src/pprust/state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ impl<'a> State<'a> {
11621162
/// For exammple each of the following would mean the wrong thing without
11631163
/// parentheses.
11641164
///
1165-
/// ```ignore
1165+
/// ```ignore (illustrative)
11661166
/// if let _ = (Struct {}) {}
11671167
///
11681168
/// if let _ = (true && false) {}
@@ -1173,7 +1173,7 @@ impl<'a> State<'a> {
11731173
/// the match guard expression. Parsing of the expression is not terminated
11741174
/// by `{` in that position.
11751175
///
1176-
/// ```ignore
1176+
/// ```ignore (illustrative)
11771177
/// match () {
11781178
/// () if let _ = Struct {} => {}
11791179
/// () if let _ = (true && false) => {}

0 commit comments

Comments
 (0)