Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/tidy.rs')
| -rw-r--r-- | xtask/src/tidy.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xtask/src/tidy.rs b/xtask/src/tidy.rs index f91192b007..40997eb93d 100644 --- a/xtask/src/tidy.rs +++ b/xtask/src/tidy.rs @@ -235,6 +235,10 @@ impl TidyDocs { return; } + if is_ported_from_rustc(path, &["crates/hir-ty/src/next_solver"]) { + return; + } + let first_line = match text.lines().next() { Some(it) => it, None => return, @@ -255,7 +259,7 @@ impl TidyDocs { } fn is_exclude_file(d: &Path) -> bool { - let file_names = ["tests.rs", "famous_defs_fixture.rs"]; + let file_names = ["tests.rs", "famous_defs_fixture.rs", "frontmatter.rs"]; d.file_name() .unwrap_or_default() @@ -290,6 +294,11 @@ fn is_exclude_dir(p: &Path, dirs_to_exclude: &[&str]) -> bool { .any(|it| dirs_to_exclude.contains(&it)) } +fn is_ported_from_rustc(p: &Path, dirs_to_exclude: &[&str]) -> bool { + let p = p.strip_prefix(project_root()).unwrap(); + dirs_to_exclude.iter().any(|exclude| p.starts_with(exclude)) +} + #[derive(Default)] struct TidyMarks { hits: HashSet<String>, |