Make an assert debug-only in `find_constraint_paths_between_regions`.
This reduces instruction counts for NLL builds of `wg-grammar` by over
20%.
r? @nikomatsakis
Do not ICE in codegen when using a extern_type static
The layout of a extern_type static is unsized, but may pass the
Well-Formed check in typeck (See #55257). As a result, we
cannot assume that a static is sized when generating the `Place`
for an r-value.
Fixes: #57876
r? @oli-obk
Improve error message and docs for non-UTF-8 bytes in stdio on Windows
This should make debugging problems like abonander/multipart#106 significantly more straightforward in the future.
cc #23344, @retep998 @alexcrichton
Not sure who do r? so I'll let rust-highfive pick one.
Allow #[repr(align(x))] on enums (#57996)
Tracking issue: #57996
Implements an extension of [RFC 1358](https://github.com/rust-lang/rfcs/blob/master/text/1358-repr-align.md) behind a feature flag (`repr_align_enum`). Originally introduced here for structs: #39999.
It seems like only HIR-level changes are required, since enums are already aware of their alignment (due to alignment of their limbs).
cc @bitshifter
This commit fixes a bug introduced by #55937 which started checking user
type annotations for associated type patterns. Where lowering a
associated constant expression would previously return a
`PatternKind::Constant`, it now returns a `PatternKind::AscribeUserType`
with a `PatternKind::Constant` inside, this commit unwraps that to
access the constant pattern inside and behaves as before.
This is especially confusing since the name `Foreign`
and the name `extern type` are so different. I deduced
that they're the same by consulting git-blame.
This moves logic from assembly to Rust and removes the special
case for exit/panic handling, merging it with regular usercall
handling.
Also, this fixes a bug in the exit usercall introduced in a75ae00.
The bug would make regular exits look like panics with high
probability. It would also with some probability leak information
through uncleared registers.
Add a forever unstable opt-out of const qualification checks
r? @eddyb
cc @RalfJung @Centril
basically a forever unstable way to screw with const things in horribly unsafe, unsound and incoherent ways.
Note that this does *not* affect miri except by maybe violating assumptions that miri makes. But there's no change in how miri evaluates things.