| Age | Commit message (Collapse) | Author | Lines |
|
Otherwise clippy tries to use the query in ways that incremental caching will inevitably cause problems with.
|
|
Add MIR validation for unwind out from nounwind functions + fixes to make validation pass
`@Nilstrieb` This is the MIR validation you asked in https://github.com/rust-lang/rust/pull/112403#discussion_r1222739722.
Two passes need to be fixed to get the validation to pass:
* `RemoveNoopLandingPads` currently unconditionally introduce a resume block (even there is none to begin with!), changed to not do that
* Generator state transform introduces a `assert` which may unwind, and its drop elaboration also introduces many new `UnwindAction`s, so in this case run the AbortUnwindingCalls after the transformation.
I believe this PR should also fix Rust-for-Linux/linux#1016, cc `@ojeda`
r? `@Nilstrieb`
|
|
rustc_do_not_const_check
|
|
|
|
|
|
This reverts commit 2ec007191348ef7cc13eb55e44e007b02cf75cf3.
|
|
|
|
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- #106425 (Make ExitStatus implement Default)
- #113480 (add aarch64-unknown-teeos target)
- #113586 (Mention style for new syntax in tracking issue template)
- #113593 (CFI: Fix error compiling core with LLVM CFI enabled)
- #114612 (update llvm-wrapper include to silence deprecation warning)
- #114613 (Prevent constant rebuilds of `rustc-main` (and thus everything else))
- #114615 (interpret: remove incomplete protection against invalid where clauses)
- #114628 (Allowing re-implementation of mir_drops_elaborated query)
- #114629 (tests: Uncomment now valid GAT code behind FIXME)
- #114630 (Migrate GUI colors test to original CSS color format)
- #114631 (add provisional cache test for new solver)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
interpret: remove incomplete protection against invalid where clauses
Cc https://github.com/rust-lang/rust/issues/97477, https://github.com/rust-lang/project-const-generics/issues/37
r? ``@lcnr``
|
|
correctly lower `impl const` to bind to host effect param
r? `@oli-obk`
|
|
|
|
simplify handling of valtrees for unsized types
|
|
Add a new `compare_bytes` intrinsic instead of calling `memcmp` directly
As discussed in #113435, this lets the backends be the place that can have the "don't call the function if n == 0" logic, if it's needed for the target. (I didn't actually *add* those checks, though, since as I understood it we didn't actually need them on known targets?)
Doing this also let me make it `const` (unstable), which I don't think `extern "C" fn memcmp` can be.
cc `@RalfJung` `@Amanieu`
|
|
|
|
interpret: use ConstPropNonsense for more const-prop induced issues
|
|
|
|
|
|
Add documentation to has_deref
Documentation of `has_deref` needed some polish to be more clear about where it should be used and what's it's purpose.
cc https://github.com/rust-lang/rust/issues/114401
r? `@RalfJung`
|
|
|
|
|
|
|
|
|
|
const validation: point at where we found a pointer but expected an integer
Instead of validation just printing "unable to turn pointer into bytes", make this a regular validation error that says where in the value the bad pointer was found. Also distinguish "expected integer, got pointer" from "expected pointer, got partial pointer or mix of pointers".
To avoid duplicating things too much I refactored the diagnostics for validity a bit, so that "got uninit, expected X" and "got pointer, expected X" can share the "X" part. Also all the errors emitted for validation are now grouped under `const_eval_validation` so that they are in a single group in the ftl file.
r? `@oli-obk`
|
|
avoid 'miri' when refering to the shared interpreter
This is basically the rustc source code version of https://github.com/rust-lang/rustc-dev-guide/pull/1471.
|
|
|
|
|
|
|
|
Use `upvar_tys` in more places, make it return a list
Just a cleanup that fell out of a PR that I was gonna write, but that PR kinda got stuck.
|
|
Miri: fix error on dangling pointer inbounds offset
We used to claim that the pointer was "dereferenced", but that is just not true.
Can be reviewed commit-by-commit. The first commit is an unrelated rename that didn't seem worth splitting into its own PR.
r? `@oli-obk`
|
|
|
|
also simplify the in-bounds checking in Miri's borrow trackers
|
|
|
|
|
|
Don't attempt to compute layout of type referencing error
Leads to more ICEs and strange diagnostics than are worth it.
Fixes #113760
|
|
Remove `constness` from `ParamEnv`
This should be replaced by keyword generics/effects. cc #110395
r? `@oli-obk`
|
|
|
|
|
|
|
|
Turns out opaque types can have hidden types registered during mir validation
See the newly added test's documentation for an explanation.
fixes #114121
|
|
|
|
inline format!() args from rustc_codegen_llvm to the end (4)
r? `@WaffleLapkin`
|
|
interpret: make read/write methods generic
Instead of always having to call `into()` to convert things to `PlaceTy`/`OpTy`, make the relevant methods generic. This also means that when we read from an `MPlaceTy`, we avoid creating an intermediate `PlaceTy`.
This makes it feasible to remove the `Copy` from `MPlaceTy`. All the other `*Ty` interpreter types already had their `Copy` removed a while ago so this is only consistent. (And in fact we had one function that accidentally took `MPlaceTy` instead of `&MPlaceTy`.)
|
|
|
|
Double check that hidden types match the expected hidden type
Fixes https://github.com/rust-lang/rust/issues/113278 specifically, but I left a TODO for where we should also add some hardening.
It feels a bit like papering over the issue, but at least this way we don't get unsoundness, but just surprising errors. Errors will be improved and given spans before this PR lands.
r? `@compiler-errors` `@lcnr`
|
|
r? @WaffleLapkin
|
|
|
|
|
|
|