tidy: Remove submodules from edition exception list

Both style-check and date-check are now on the 2021 edition, and this
commit also updates their repositories' submodules.
This commit is contained in:
Noah Lev 2021-10-24 13:27:13 -07:00
parent 00d5e42e77
commit f410bc7dc1
3 changed files with 3 additions and 11 deletions

@ -1 +1 @@
Subproject commit b5c68b02984f74e99d1f1b332029e05f607e2660
Subproject commit a01d151a7250a540a9cb7ccce5956f020c677c21

@ -1 +1 @@
Subproject commit fba15a46ca8efa97e8a955794724ac7ce27805b8
Subproject commit b06008731af0f7d07cd0614e820c8276dfed1c18

View file

@ -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!(