From 1f1dd5f3cc522de86eb0ef5b8df53af0e347f73b Mon Sep 17 00:00:00 2001 From: Ezra Shaw Date: Mon, 2 Jan 2023 16:14:21 +1300 Subject: [PATCH] pattern destructure `has_test` Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com> --- src/tools/tidy/src/error_codes.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tools/tidy/src/error_codes.rs b/src/tools/tidy/src/error_codes.rs index ac87e4797c59..42d94311d228 100644 --- a/src/tools/tidy/src/error_codes.rs +++ b/src/tools/tidy/src/error_codes.rs @@ -173,9 +173,7 @@ fn check_error_codes_docs( return; } - // `has_test.0` checks whether the error code has any (potentially untested) code example. - // `has_test.1` checks whether the error code has a proper (definitely tested) doctest. - let has_test = check_explanation_has_doctest(&contents, &err_code); + let (found_code_example, found_proper_doctest, emit_ignore_warning, emit_no_longer_warning) = check_explanation_has_doctest(&contents, &err_code); if has_test.2 { verbose_print!( verbose,