diff --git a/src/test/ui/feature-gates/stability-attribute-consistency.stderr b/src/test/ui/feature-gates/stability-attribute-consistency.stderr index d49b44c8a3586..1b93d3c96376a 100644 --- a/src/test/ui/feature-gates/stability-attribute-consistency.stderr +++ b/src/test/ui/feature-gates/stability-attribute-consistency.stderr @@ -12,3 +12,4 @@ LL | #[unstable(feature = "foo", issue = "none")] error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0711`. diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr index 079230b2a3160..89a8425f5e78a 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr @@ -132,5 +132,5 @@ LL | #[stable(feature = "a", since = "1.0.0")] error: aborting due to 20 previous errors -Some errors have detailed explanations: E0539, E0541, E0542, E0543, E0544, E0546, E0547, E0549. +Some errors have detailed explanations: E0539, E0541, E0542, E0543, E0544, E0546, E0547, E0549, E0711. For more information about an error, try `rustc --explain E0539`. diff --git a/src/test/ui/variance/variance-associated-consts.stderr b/src/test/ui/variance/variance-associated-consts.stderr index 219f5bca9e301..f9732d02cb285 100644 --- a/src/test/ui/variance/variance-associated-consts.stderr +++ b/src/test/ui/variance/variance-associated-consts.stderr @@ -6,3 +6,4 @@ LL | struct Foo { error: aborting due to previous error +For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-associated-types.stderr b/src/test/ui/variance/variance-associated-types.stderr index 94f770eda33ef..5ce62884e1d83 100644 --- a/src/test/ui/variance/variance-associated-types.stderr +++ b/src/test/ui/variance/variance-associated-types.stderr @@ -12,3 +12,4 @@ LL | struct Bar<'a, T : Trait<'a>> { error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-object-types.stderr b/src/test/ui/variance/variance-object-types.stderr index ceee53aff105d..1c3c1a6d1f223 100644 --- a/src/test/ui/variance/variance-object-types.stderr +++ b/src/test/ui/variance/variance-object-types.stderr @@ -6,3 +6,4 @@ LL | struct Foo<'a> { error: aborting due to previous error +For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-regions-direct.stderr b/src/test/ui/variance/variance-regions-direct.stderr index 25fb22732151c..27d69b6e82575 100644 --- a/src/test/ui/variance/variance-regions-direct.stderr +++ b/src/test/ui/variance/variance-regions-direct.stderr @@ -42,3 +42,4 @@ LL | enum Test8<'a, 'b, 'c:'b> { error: aborting due to 7 previous errors +For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-regions-indirect.stderr b/src/test/ui/variance/variance-regions-indirect.stderr index fc52492d7efdd..535e97db3fb10 100644 --- a/src/test/ui/variance/variance-regions-indirect.stderr +++ b/src/test/ui/variance/variance-regions-indirect.stderr @@ -30,3 +30,4 @@ LL | struct Derived4<'a, 'b, 'c:'b> { error: aborting due to 5 previous errors +For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-trait-bounds.stderr b/src/test/ui/variance/variance-trait-bounds.stderr index e3ef339f423bc..3f6ca62a64069 100644 --- a/src/test/ui/variance/variance-trait-bounds.stderr +++ b/src/test/ui/variance/variance-trait-bounds.stderr @@ -24,3 +24,4 @@ LL | struct TestBox+Setter> { error: aborting due to 4 previous errors +For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-trait-object-bound.stderr b/src/test/ui/variance/variance-trait-object-bound.stderr index c86cf1f82b45d..9a2c924b96a95 100644 --- a/src/test/ui/variance/variance-trait-object-bound.stderr +++ b/src/test/ui/variance/variance-trait-object-bound.stderr @@ -6,3 +6,4 @@ LL | struct TOption<'a> { error: aborting due to previous error +For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-types-bounds.stderr b/src/test/ui/variance/variance-types-bounds.stderr index dbe8af75d5178..523763b8a07b4 100644 --- a/src/test/ui/variance/variance-types-bounds.stderr +++ b/src/test/ui/variance/variance-types-bounds.stderr @@ -30,3 +30,4 @@ LL | struct TestObject { error: aborting due to 5 previous errors +For more information about this error, try `rustc --explain E0208`. diff --git a/src/test/ui/variance/variance-types.stderr b/src/test/ui/variance/variance-types.stderr index 8358b18b73ce2..5a5aaecffc5eb 100644 --- a/src/test/ui/variance/variance-types.stderr +++ b/src/test/ui/variance/variance-types.stderr @@ -36,3 +36,4 @@ LL | enum Enum { error: aborting due to 6 previous errors +For more information about this error, try `rustc --explain E0208`. diff --git a/src/tools/tidy/src/error_codes.rs b/src/tools/tidy/src/error_codes.rs index 8d70335a9e7b9..9aacc07e0ab4f 100644 --- a/src/tools/tidy/src/error_codes.rs +++ b/src/tools/tidy/src/error_codes.rs @@ -27,7 +27,8 @@ const ERROR_DOCS_PATH: &str = "compiler/rustc_error_codes/src/error_codes/"; const ERROR_TESTS_PATH: &str = "src/test/ui/error-codes/"; // Error codes that (for some reason) can't have a doctest in their explanation. Error codes are still expected to provide a code example, even if untested. -const IGNORE_DOCTEST_CHECK: &[&str] = &["E0464", "E0570", "E0601", "E0602"]; +const IGNORE_DOCTEST_CHECK: &[&str] = + &["E0208", "E0464", "E0570", "E0601", "E0602", "E0640", "E0717"]; // Error codes that don't yet have a UI test. This list will eventually be removed. const IGNORE_UI_TEST_CHECK: &[&str] = &[ @@ -193,6 +194,7 @@ fn check_error_codes_docs( "warning: Error code `{err_code}` doesn't have a code example, all error codes are expected to have one \ (even if untested)." ); + return; } let test_ignored = IGNORE_DOCTEST_CHECK.contains(&&err_code); diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index f409a86db26c0..2cf8f5c7ca322 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -64,6 +64,8 @@ const PROBLEMATIC_CONSTS: &[u32] = &[ 3735927486, 3735932941, 4027431614, 4276992702, ]; +const INTERNAL_COMPILER_DOCS_LINE: &str = "#### This error code is internal to the compiler and will not be emitted with normal Rust code."; + /// Parser states for `line_is_url`. #[derive(Clone, Copy, PartialEq)] #[allow(non_camel_case_types)] @@ -132,6 +134,8 @@ fn long_line_is_ok(extension: &str, is_error_code: bool, max_columns: usize, lin "ftl" => true, // non-error code markdown is allowed to be any length "md" if !is_error_code => true, + // HACK(Ezrashaw): there is no way to split a markdown header over multiple lines + "md" if line == INTERNAL_COMPILER_DOCS_LINE => true, _ => line_is_url(is_error_code, max_columns, line) || should_ignore(line), } }