about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorEzra Shaw <Ezrasure@outlook.com>2023-01-02 16:14:21 +1300
committerGitHub <noreply@github.com>2023-01-02 16:14:21 +1300
commit1f1dd5f3cc522de86eb0ef5b8df53af0e347f73b (patch)
tree295e74ace4ed41164ee8de61a26ca5ae27b1b8f3 /src/tools
parentfafb18e0c45b60bacd08e2d8c8932401181dafbc (diff)
downloadrust-1f1dd5f3cc522de86eb0ef5b8df53af0e347f73b.tar.gz
rust-1f1dd5f3cc522de86eb0ef5b8df53af0e347f73b.zip
pattern destructure `has_test`
Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/tidy/src/error_codes.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tools/tidy/src/error_codes.rs b/src/tools/tidy/src/error_codes.rs
index ac87e4797c5..42d94311d22 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,