Make re-export collection deterministic
Fixes https://github.com/rust-lang/rust/issues/65036
Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR #64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.
See #65042 for a long-term strategy to detect this kind of issue
Rollup of 18 pull requests
This contains changes from all the successful runs that bors marked as timed out, plus a revert of #63649 which appears to be the immediate cause of the timeouts.
Successful merges:
- #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`)
- #64728 (Stabilize UdpSocket::peer_addr)
- #64765 (std: Reduce checks for `feature = "backtrace"`)
- #64909 (When encountering chained operators use heuristics to recover from bad turbofish)
- #65011 (Do not ICE when dereferencing non-Copy raw pointer)
- #65064 (permit asyncawait-ondeck to be added by anyone)
- #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR)
- #65100 (Replace GeneratorSubsts with SubstsRef)
- #65105 (Split out some passes from librustc)
- #65106 (Allow unused attributes to avoid incremental bug)
- #65113 (Fix lonely backtick)
- #65116 (Remove unneeded visit_statement definition)
- #65118 (Update the documented default of -Z mutable-noalias)
- #65123 (Account for macro invocation in `let mut $pat` diagnostic.)
- #65124 (Replace some instances of `as *[const | mut] _` with `.cast()`)
- #65126 (Fix typo on `now()` comments)
- #65130 (lint: extern non-exhaustive types are improper)
- #65151 (Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend")
Failed merges:
r? @ghost
Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend"
This change caused the runtime of the linux-asmjs builder to nearly double from 2+ hours to about 4 hours, which happens to be the bors timeout. (It made it in barely under 4 hours when it was merged.) This is causing timeouts on all new changes.
This reverts commit 7870050796, reversing
changes made to 2e7244807a.
lint: extern non-exhaustive types are improper
This PR makes the `improper_ctype` lint trigger for non-exhaustive types when those types aren't defined in the current crate, as per [this comment](https://github.com/rust-lang/rust/issues/44109#issuecomment-537583344).
cc @Centril
Fix typo on `now()` comments
Fix typo, update words, and remove some redundant word.
Also rustfmt on the rest of the file (hope this is okay :)
revival of #61433
r? @kennytm
Split out some passes from librustc
This is just moving them out to librustc_passes -- I've not measured compile time or run time. I don't expect any significant impact, but this seems prudent regardless.
std: Reduce checks for `feature = "backtrace"`
This is a stylistic change to libstd to reduce the number of checks of
`feature = "backtrace"` now that we unconditionally depend on the
`backtrace` crate and rely on it having an empty implementation.
otherwise.
Stabilize `Option::as_deref` and `Option::as_deref_mut`
The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.
Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR #64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.
See #65042 for a long-term strategy to detect this kind of issue
the measureme tools summarize and crox do not alow a event to go out of scope of the parent event
codegen_and_optimize_crate ends after the codegen_crate event
This commit makes the `improper_ctype` lint trigger for non-exhaustive
types when those types aren't defined in the current crate.
Signed-off-by: David Wood <david@davidtw.co>