diff options
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/ast_src.rs | 2 | ||||
-rw-r--r-- | xtask/tests/tidy-tests/main.rs | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 69cba9168..9c02f7c6f 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -511,7 +511,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
511 | T![..], | 511 | T![..], |
512 | T!['}'] | 512 | T!['}'] |
513 | } | 513 | } |
514 | struct RecordFieldPat: AttrsOwner, NameOwner { T![:], Pat } | 514 | struct RecordFieldPat: AttrsOwner { NameRef, T![:], Pat } |
515 | 515 | ||
516 | struct TupleStructPat { Path, T!['('], args: [Pat], T![')'] } | 516 | struct TupleStructPat { Path, T!['('], args: [Pat], T![')'] } |
517 | struct TuplePat { T!['('], args: [Pat], T![')'] } | 517 | struct TuplePat { T!['('], args: [Pat], T![')'] } |
diff --git a/xtask/tests/tidy-tests/main.rs b/xtask/tests/tidy-tests/main.rs index 80911a68e..101ae19bd 100644 --- a/xtask/tests/tidy-tests/main.rs +++ b/xtask/tests/tidy-tests/main.rs | |||
@@ -20,7 +20,17 @@ fn rust_files_are_tidy() { | |||
20 | } | 20 | } |
21 | 21 | ||
22 | fn check_todo(path: &Path, text: &str) { | 22 | fn check_todo(path: &Path, text: &str) { |
23 | if path.ends_with("tests/cli.rs") { | 23 | let whitelist = &[ |
24 | // This file itself is whitelisted since this test itself contains matches. | ||
25 | "tests/cli.rs", | ||
26 | // Some of our assists generate `todo!()` so those files are whitelisted. | ||
27 | "doc_tests/generated.rs", | ||
28 | "handlers/add_missing_impl_members.rs", | ||
29 | "handlers/add_function.rs", | ||
30 | // To support generating `todo!()` in assists, we have `expr_todo()` in ast::make. | ||
31 | "ast/make.rs", | ||
32 | ]; | ||
33 | if whitelist.iter().any(|p| path.ends_with(p)) { | ||
24 | return; | 34 | return; |
25 | } | 35 | } |
26 | if text.contains("TODO") || text.contains("TOOD") || text.contains("todo!") { | 36 | if text.contains("TODO") || text.contains("TOOD") || text.contains("todo!") { |