Skip to content

Commit 2c92c72

Browse files
committed
fix: fix CI errors
1 parent 24ce65c commit 2c92c72

13 files changed

+18
-2
lines changed

Diff for: src/test/ui/feature-gates/stability-attribute-consistency.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ LL | #[unstable(feature = "foo", issue = "none")]
1212

1313
error: aborting due to 2 previous errors
1414

15+
For more information about this error, try `rustc --explain E0711`.

Diff for: src/test/ui/stability-attribute/stability-attribute-sanity.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,5 @@ LL | #[stable(feature = "a", since = "1.0.0")]
132132

133133
error: aborting due to 20 previous errors
134134

135-
Some errors have detailed explanations: E0539, E0541, E0542, E0543, E0544, E0546, E0547, E0549.
135+
Some errors have detailed explanations: E0539, E0541, E0542, E0543, E0544, E0546, E0547, E0549, E0711.
136136
For more information about an error, try `rustc --explain E0539`.

Diff for: src/test/ui/variance/variance-associated-consts.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ LL | struct Foo<T: Trait> {
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/test/ui/variance/variance-associated-types.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ LL | struct Bar<'a, T : Trait<'a>> {
1212

1313
error: aborting due to 2 previous errors
1414

15+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/test/ui/variance/variance-object-types.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ LL | struct Foo<'a> {
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/test/ui/variance/variance-regions-direct.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ LL | enum Test8<'a, 'b, 'c:'b> {
4242

4343
error: aborting due to 7 previous errors
4444

45+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/test/ui/variance/variance-regions-indirect.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ LL | struct Derived4<'a, 'b, 'c:'b> {
3030

3131
error: aborting due to 5 previous errors
3232

33+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/test/ui/variance/variance-trait-bounds.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ LL | struct TestBox<U,T:Getter<U>+Setter<U>> {
2424

2525
error: aborting due to 4 previous errors
2626

27+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/test/ui/variance/variance-trait-object-bound.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ LL | struct TOption<'a> {
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/test/ui/variance/variance-types-bounds.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ LL | struct TestObject<A, R> {
3030

3131
error: aborting due to 5 previous errors
3232

33+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/test/ui/variance/variance-types.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ LL | enum Enum<A,B,C> {
3636

3737
error: aborting due to 6 previous errors
3838

39+
For more information about this error, try `rustc --explain E0208`.

Diff for: src/tools/tidy/src/error_codes.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ const ERROR_DOCS_PATH: &str = "compiler/rustc_error_codes/src/error_codes/";
2727
const ERROR_TESTS_PATH: &str = "src/test/ui/error-codes/";
2828

2929
// 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.
30-
const IGNORE_DOCTEST_CHECK: &[&str] = &["E0464", "E0570", "E0601", "E0602"];
30+
const IGNORE_DOCTEST_CHECK: &[&str] =
31+
&["E0208", "E0464", "E0570", "E0601", "E0602", "E0640", "E0717"];
3132

3233
// Error codes that don't yet have a UI test. This list will eventually be removed.
3334
const IGNORE_UI_TEST_CHECK: &[&str] = &[
@@ -193,6 +194,7 @@ fn check_error_codes_docs(
193194
"warning: Error code `{err_code}` doesn't have a code example, all error codes are expected to have one \
194195
(even if untested)."
195196
);
197+
return;
196198
}
197199

198200
let test_ignored = IGNORE_DOCTEST_CHECK.contains(&&err_code);

Diff for: src/tools/tidy/src/style.rs

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ const PROBLEMATIC_CONSTS: &[u32] = &[
6464
3735927486, 3735932941, 4027431614, 4276992702,
6565
];
6666

67+
const INTERNAL_COMPILER_DOCS_LINE: &str = "#### This error code is internal to the compiler and will not be emitted with normal Rust code.";
68+
6769
/// Parser states for `line_is_url`.
6870
#[derive(Clone, Copy, PartialEq)]
6971
#[allow(non_camel_case_types)]
@@ -132,6 +134,8 @@ fn long_line_is_ok(extension: &str, is_error_code: bool, max_columns: usize, lin
132134
"ftl" => true,
133135
// non-error code markdown is allowed to be any length
134136
"md" if !is_error_code => true,
137+
// HACK(Ezrashaw): there is no way to split a markdown header over multiple lines
138+
"md" if line == INTERNAL_COMPILER_DOCS_LINE => true,
135139
_ => line_is_url(is_error_code, max_columns, line) || should_ignore(line),
136140
}
137141
}

0 commit comments

Comments
 (0)