about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/tidy/src/edition.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/tidy/src/edition.rs b/src/tools/tidy/src/edition.rs
index 3f59fefd041..f610dbd806a 100644
--- a/src/tools/tidy/src/edition.rs
+++ b/src/tools/tidy/src/edition.rs
@@ -23,8 +23,10 @@ pub fn check(path: &Path, bad: &mut bool) {
                 return;
             }
 
-            // Library crates are not yet ready to migrate to 2021.
-            if path.components().any(|c| c.as_os_str() == "library") {
+            // Not all library crates are ready to migrate to 2021.
+            if file.components().any(|c| c.as_os_str() == "library")
+                && file.components().all(|c| c.as_os_str() != "std")
+            {
                 let has = contents.lines().any(is_edition_2018);
                 if !has {
                     tidy_error!(