| Age | Commit message (Collapse) | Author | Lines |
|
and show some extra information when it happens in CTFE
|
|
|
|
Shrink `FnAbi`
Because they can take up a lot of memory in debug and release builds.
r? `@bjorn3`
|
|
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #100724 (Migrate ast lowering to session diagnostic)
- #100735 (Migrate `rustc_ty_utils` to `SessionDiagnostic`)
- #100738 (Diagnostics migr const eval)
- #100744 (Migrate rustc_mir_dataflow to diagnostic structs)
- #100776 (Migrate `rustc_lint` errors to `SessionDiagnostic`)
- #100817 (sugg: suggest the usage of boolean value when there is a typo in the keyword)
- #100836 (Migrate `rustc_attr` crate diagnostics)
- #100890 (Migrate rustc_driver to SessionDiagnostic)
- #100900 (on `region_errors.rs`)
Failed merges:
- #100831 (Migrate `symbol_mangling` module to new diagnostics structs)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Diagnostics migr const eval
This PR should eventually contain all diagnostic migrations for the `rustc_const_eval` crate.
r? `@davidtwco`
`@rustbot` label +A-translation
|
|
initialized Scalar
|
|
|
|
|
|
|
|
|
|
|
|
Because it's only needed for that variant. This shrinks the types and
clarifies the logic.
|
|
Because it's only ever set to `None` or `Some(Reg::i32())`.
|
|
Because `PassMode::Cast` is by far the largest variant, but is
relatively rare.
This requires making `PassMode` not impl `Copy`, and `Clone` is no
longer necessary. This causes lots of sigil adjusting, but nothing very
notable.
|
|
Check projection types before inlining MIR
Fixes https://github.com/rust-lang/rust/issues/100550
I'm very unhappy with this solution, having to duplicate MIR validation code, but at least it removes the ICE.
r? `@compiler-errors`
|
|
|
|
|
|
|
|
|
|
|
|
create_feature_err() builder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
suggest `once_cell::Lazy` for non-const statics
Addresses https://github.com/rust-lang/rust/issues/100410
Some questions:
- removing the `if` seems to include too many cases (e.g. calls to non-const functions inside a `const fn`), but this code excludes the following case:
```rust
const FOO: Foo = non_const_fn();
```
Should we suggest `once_cell` in this case as well?
- The original issue mentions suggesting `AtomicI32` instead of `Mutex<i32>`, should this PR address that as well?
|
|
make NOP dyn casts not require anything about the vtable
As suggested [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/dyn-upcasting.20stabilization/near/292151439). This matches what the codegen backends already do, and what Miri did do until https://github.com/rust-lang/rust/pull/99420 when I made it super extra paranoid.
|
|
interpret: only consider 1-ZST when searching for receiver
`repr(transparent)` currently entirely rejects ZST with alignment larger than 1 (which is odd, arguably [this](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=02870f29396fa948c3123cb53d869ad1) should be accepted), so this should be safe. And if it ever isn't safe then that is very likely a bug elsewhere in the compiler.
|
|
Rename Machine memory hooks to suggest when they run
Some of the other memory hooks start with `before_` or `after_` to indicate that they run before or after a certain operation. These don't, so I was a bit confused as to when they are supposed to run.
`memory_read` can be read two ways in English, "memory was read" or "this is a memory read" so without the prefix this was especially ambiguous.
|
|
|
|
|
|
Erase regions better in `promote_candidate`
Use `tcx.erase_regions` instead of manually walking through the substs.... this also makes the code slightly simpler :see_no_evil:
Fixes #100360
Fixes #89851
|
|
|
|
add -Zextra-const-ub-checks to enable more UB checking in const-eval
Cc https://github.com/rust-lang/rust/issues/99923
r? `@oli-obk`
|
|
|
|
Improve size assertions
r? `@lqd`
|
|
Some of these don't need a `use` statement because there is already a
`#[macro_use] extern crate rustc_data_structures` item in the crate.
|
|
|
|
add method to get the mutability of an AllocId
Miri needs this for https://github.com/rust-lang/miri/issues/2463.
|
|
|
|
|
|
Some `FulfillmentContext`-related cleanups
Use `ObligationCtxt` in some places, remove some `FulfillmentContext`s in others...
r? types
|
|
|
|
More EarlyBinder cleanups
Each commit is independent
r? types
|
|
It spawns up a trait engine, registers the single obligation, then fully
solves it
|