This repository was archived by the owner on Oct 31, 2025. It is now read-only.
Switch to Rust 2021.#953
Merged
eddyb merged 3 commits intoEmbarkStudios:mainfrom Jan 30, 2023
LykenSol:rust2021
Merged
Conversation
Contributor
|
Oh good point, I also forgot the changelog with the nightly update. |
oisyn
approved these changes
Jan 9, 2023
fu5ha
approved these changes
Jan 9, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is built on the following PRs: (EDIT: now all of them merged)
Spans to detect "system crate"s, for error deferral (zombie) purposes. #952bimapdependency with a more efficient pair of maps, and arena-allocate slices. #951Sadly, this is not ready. The big issue here is that Rust 2021 makespanic!("...")go through the sameformat_args!("...")machinery as everything else (i.e. its special-casing was removed - this means that e.g.panic!("foo: {}")no long bypasses format string checks, and actually errors).While we should have the ability to ignore such things, there's enough going on that our panic entry-point special-casing (plus thefnparam weakening, maybe?) doesn't actually bypass the "zombie" systems enough.My best guess so far is that, unlike a string literal constant,format_args!actually needs local variables, and the "zombie" system's concept of "dead code" might not include them.So far my efforts have focused on improving the granularity of the "zombie" system (hence the other PRs), to better debug such failure modes (when I started, it kept pointing atptr::metadata, which is pretty useless).EDIT: the new Rust 2021
panic!(which always usesformat_args!) is now supported (by removing simple invocations offormat_args!feeding directly into a panic entry-point)