Skip to content

tidy: Remove submodules from edition exception list #90143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/reference
10 changes: 1 addition & 9 deletions src/tools/tidy/src/edition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,13 @@ pub fn check(path: &Path, bad: &mut bool) {
&mut |path| super::filter_dirs(path) || path.ends_with("src/test"),
&mut |entry, contents| {
let file = entry.path();
let filestr = file.to_string_lossy().replace("\\", "/");
let filename = file.file_name().unwrap();
if filename != "Cargo.toml" {
return;
}

// Library crates are not yet ready to migrate to 2021.
//
// The reference and rustc-dev-guide are submodules, so are left at
// 2018 for now. They should be removed from this exception list
// when bumped.
if path.components().any(|c| c.as_os_str() == "library")
|| filestr.contains("src/doc/reference/style-check/Cargo.toml")
|| filestr.contains("src/doc/rustc-dev-guide/ci/date-check/Cargo.toml")
{
if path.components().any(|c| c.as_os_str() == "library") {
let has = contents.lines().any(is_edition_2018);
if !has {
tidy_error!(
Expand Down