Skip to content

Commit

Permalink
fix: fix CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezrashaw committed Jan 9, 2023
1 parent 24ce65c commit 2c92c72
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-associated-consts.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ LL | struct Foo<T: Trait> {

error: aborting due to previous error

For more information about this error, try `rustc --explain E0208`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-associated-types.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-object-types.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ LL | struct Foo<'a> {

error: aborting due to previous error

For more information about this error, try `rustc --explain E0208`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-regions-direct.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-regions-indirect.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-trait-bounds.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ LL | struct TestBox<U,T:Getter<U>+Setter<U>> {

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0208`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-trait-object-bound.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ LL | struct TOption<'a> {

error: aborting due to previous error

For more information about this error, try `rustc --explain E0208`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-types-bounds.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ LL | struct TestObject<A, R> {

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0208`.
1 change: 1 addition & 0 deletions src/test/ui/variance/variance-types.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ LL | enum Enum<A,B,C> {

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0208`.
4 changes: 3 additions & 1 deletion src/tools/tidy/src/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] = &[
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions src/tools/tidy/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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),
}
}
Expand Down

0 comments on commit 2c92c72

Please sign in to comment.