macos tlv workaround
fixes: #60141
Includes:
* remove dead code: `requires_move_before_drop`. This hasn't been needed for a while now (oops I should have removed it in #57655)
* redox had a copy of `fast::Key` (not sure why?). That has been removed.
* Perform a `read_volatile` on OSX to reduce `tlv_get_addr` calls per `__getit` from (4-2 depending on context) to 1.
`tlv_get_addr` is relatively expensive (~1.5ns on my machine).
Previously, in contexts where `__getit` was inlined, 4 calls to `tlv_get_addr` were performed per lookup. For some reason when `__getit` is not inlined this is reduced to 2x - and performance improves to match.
After this PR, I have only ever seen 1x call to `tlv_get_addr` per `__getit`, and macos now benefits from situations where `__getit` is inlined.
I'm not sure if the `read_volatile(&&__KEY)` trick is working around an LLVM bug, or a rustc bug, or neither.
r? @alexcrichton
Support `cfg` and `cfg_attr` on generic parameters
`cfg` attributes are supported in all other positions where attributes are accepted at all.
They were previously prohibited in https://github.com/rust-lang/rust/pull/51283 because they weren't implemented correctly before that and were simply ignored.
`ByRef` const values have no identity beyond their value, we should not treat them as having identity. The `AllocId` often differed between equal constants, because of the way that the miri-engine evaluates constants.
Improve the explicit_outlives_requirements lint
* Don't use Strings to compare parameters
* Extend the lint to lifetime bounds
* Extend the lint to enums and unions
* Use the correct span for where clauses in tuple structs
* Try to early-out where possible
* Remove unnecessary bounds in rustc crates
Refactor interning to properly mark memory as mutable or immutable
r? @RalfJung
This implementation is incomplete out of multiple reasons
* [ ] add `-Zunleash_the_miri_inside_of_you` tests
* [ ] report an error if there's an `UnsafeCell` behind a reference in a constant
* [ ] make validity checks actually test whether the mutability of their allocations match what they see in the type
Rollup of 11 pull requests
Successful merges:
- #61505 (Only show methods that appear in `impl` blocks in the Implementors sections of trait doc pages)
- #61701 (move stray run-pass const tests into const/ folder)
- #61748 (Tweak transparent enums and unions diagnostic spans)
- #61802 (Make MaybeUninit #[repr(transparent)])
- #61839 (ci: Add a script for generating CPU usage graphs)
- #61842 (Remove unnecessary lift calls)
- #61843 (Turn down the myriad-closures test)
- #61896 (rustc_typeck: correctly compute `Substs` for `Res::SelfCtor`.)
- #61898 (syntax: Factor out common fields from `SyntaxExtension` variants)
- #61938 (create an issue for miri even in status test-fail)
- #61941 (Preserve generator and yield source for error messages)
Failed merges:
r? @ghost