-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Switch rustdoc to Rust 2021 #89075
Switch rustdoc to Rust 2021 #89075
Conversation
rustdoc-json-types is a public (although nightly-only) API. Consider changing |
(rust-highfive has picked a reviewer for you, use r? to override) |
cc @rust-lang/rustdoc |
My process for making this change was as follows:
(And now CI is running tests.) I didn't use |
I don't think we need to wait on the compiler being switched to Rust 2021 because editions are supposed to allow you to use crates with other editions :) |
This comment has been minimized.
This comment has been minimized.
Looks like I'll need to update tidy 😆 |
Once all crates have been switched to Rust 2021, I think this code should be changed to be similar to the old version but with 2021 instead of 2018. For now, allow both editions during the transition.
6471cfa
to
60c6589
Compare
I made the change to tidy in this PR since it's very small and is a blocker, but let me know if you'd rather that I open a separate PR for it. |
Only remaining decision point is #89075 (comment), and then I think this should be good to merge! |
I think I would prefer to hold this (it doesn't seem that pressing) until I finish up the migration work with bootstrap. I'll likely cherry pick some of your work at least, but I want to make sure we don't mark crates with 2021 if we haven't verified them as OK with the compatibility lint. I'd also like to follow-up with the rfc 2229 group about the insignificant dtor - #89075 (comment) - because I don't think we should be linting at all in that case. Of course, it's not necessary to block landing migrations on those fixes, but it also seems like we do not gain anything significant from pushing this forward quickly? And we'd get some additional testing if we hold off a little. |
Sure, it's not that pressing, but I figured it'd be another way to test the edition. I'm happy to drop the change to
The root variable ( |
This is the full error in case it's useful to the WG (in this case, I ran rustc with
|
I've filed #89080 to track the specific case we're seeing here.
For sure! I expect we'll get this merged by the end of the week at the latest, so I don't think it loses us much - I think migrating the crates deps first will also help us test more than the leaves first approach, fwiw. (Since we get far more testing of leaves in e.g. crater runs, but partial migrations of dependencies are less visible). |
Sounds good! :) |
OK, I talked to @arora-aman and it looks like we never finalized the insignificant destructor work by actually applying the attributes to std -- a PR doing that should be forthcoming shortly. I think it probably makes sense to not try to one off migrate individual crates in the tree -- it'll generate more PRs and ultimately feels like it'll be more hassle than just rolling everything into one PR (which migrates everything except the library/ crates, as there's currently a bug with the panic macro edition handling -- we can't migrate libcore at least yet). I've posted #89103 to replace this PR -- that rolls in an update to 2021 across almost all in-tree crates. |
Migrate in-tree crates to 2021 This replaces rust-lang#89075 (cherry picking some of the commits from there), and closes rust-lang#88637 and fixes rust-lang#89074. It excludes a migration of the library crates for now (see tidy diff) because we have some pending bugs around macro spans to fix there. I instrumented bootstrap during the migration to make sure all crates moved from 2018 to 2021 had the compatibility warnings applied first. Originally, the intent was to support cargo fix --edition within bootstrap, but this proved fairly difficult to pull off. We'd need to architect the check functionality to support running cargo check and cargo fix within the same x.py invocation, and only resetting sysroots on check. Further, it was found that cargo fix doesn't behave too well with "not quite workspaces", such as Clippy which has several crates. Bootstrap runs with --manifest-path ... for all the tools, and this makes cargo fix only attempt migration for that crate. We can't use e.g. --workspace due to needing to maintain sysroots for different phases of compilation appropriately. It is recommended to skip the mass migration of Cargo.toml's to 2021 for review purposes; you can also use `git diff d6cd2c6 -I'^edition = .20...$'` to ignore the edition = 2018/21 lines in the diff.
☔ The latest upstream changes (presumably #89103) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing now that #89103 has been merged. |
Migrate in-tree crates to 2021 This replaces rust-lang#89075 (cherry picking some of the commits from there), and closes rust-lang#88637 and fixes rust-lang#89074. It excludes a migration of the library crates for now (see tidy diff) because we have some pending bugs around macro spans to fix there. I instrumented bootstrap during the migration to make sure all crates moved from 2018 to 2021 had the compatibility warnings applied first. Originally, the intent was to support cargo fix --edition within bootstrap, but this proved fairly difficult to pull off. We'd need to architect the check functionality to support running cargo check and cargo fix within the same x.py invocation, and only resetting sysroots on check. Further, it was found that cargo fix doesn't behave too well with "not quite workspaces", such as Clippy which has several crates. Bootstrap runs with --manifest-path ... for all the tools, and this makes cargo fix only attempt migration for that crate. We can't use e.g. --workspace due to needing to maintain sysroots for different phases of compilation appropriately. It is recommended to skip the mass migration of Cargo.toml's to 2021 for review purposes; you can also use `git diff d6cd2c6 -I'^edition = .20...$'` to ignore the edition = 2018/21 lines in the diff.
Closes #89074. 🎉