Create a canonical trait query for `evaluate_obligation`
This builds on the canonical query machinery introduced in #48411 to introduce a new canonical trait query for `evaluate_obligation` in the trait selector. Also ports most callers of the original `evaluate_obligation` to the new system (except in coherence, which requires support for intercrate mode). Closes#48537.
r? @nikomatsakis
We store the obligation that caused the overflow as part of the OverflowError, and report it at the public API endpoints (rather than in the implementation internals).
This commit emits the `uwtable` attribute to LLVM for platforms that require it
for the allocator shims that we generate to ensure that they can hopefully get
unwound past. This is a stab in the dark at helping
https://bugzilla.mozilla.org/show_bug.cgi?id=1456150 along.
drop elaboration should reveal all
This used to happen implicitly through the normalization function; but we now keep the param-env as is, which seems less surprising.
cc #49685
r? @eddyb
Treat repr(Rust) univariant fieldless enums as ZSTs
This makes all those enums be represented the same way:
```rust
enum A1 { B1 }
enum A2 { B2 = 0 }
enum A3 { B3, C3(!) }
```
Related to #15747.
Cc @rust-lang/wg-codegen @rust-lang/lang
Upstream bug reports (rustwasm/wasm-bindgen#119) show that this may be the
culprit of odd crashes/hangs. The linker is a tiny fraction of build time anyway
right now so let's disable it and figure out how to possibly reenable it later
if necessary.
Rollup of 4 pull requests
Successful merges:
- #50177 (mark std::str::replace(,n) as #[must_use])
- #50207 (Hash EntryKind::AssociatedConst const data)
- #50214 (Js improvements)
- #50219 (Added missing `.` in docs.)
Failed merges:
- #50229 (Add setting to go to item if there is only one result)
Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.
The patch also removes some now-unnecessary log_enabled! tests at call
sites.
Allow variant discriminant initializers to refer to other initializer…
…s of the same enum
r? @eddyb
fixes the 2.4 failure of https://github.com/rust-lang/rust/issues/49765
cc @durka @retep998