about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-18 10:26:40 +0100
committerGitHub <noreply@github.com>2021-12-18 10:26:40 +0100
commitefbefb673d693263d5105e80ee948bfea819d9ae (patch)
tree08e2330fe6bc05c9fd66db8cfca1ae540d9a7827 /src/tools
parente69acdaae479848753a816f6e9b7cab1aa650685 (diff)
parentb656384d8398ec03ce5c40056252f818d6c44761 (diff)
downloadrust-efbefb673d693263d5105e80ee948bfea819d9ae.tar.gz
rust-efbefb673d693263d5105e80ee948bfea819d9ae.zip
Rollup merge of #92030 - rukai:stdlib2021, r=m-ou-se
Update stdlib to the 2021 edition

progress towards https://github.com/rust-lang/rust/issues/88638

I couldnt find a way to run the 2018 style panic tests against 2018 so I just deleted them, maybe theres a way to do it that I missed though?
Diffstat (limited to 'src/tools')
-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!(