| Age | Commit message (Collapse) | Author | Lines |
|
Remove misc_cast and validate types when casting
Continuing our work in #102675
r? ````@oli-obk````
|
|
printing constants
|
|
|
|
|
|
interpret: remove an incorrect assertion
This fixes an ICE in Miri, [reported](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/SwitchInt.20with.20no.20targets.3F) by `@saethlin.` The faulty assertion was introduced by https://github.com/rust-lang/rust/commit/432535da2b5144d467056efcfa6864d35ba2de0f, when a previously correct assertion checking that the `otherwise` target exists got replaced by this assertion checking that at least one more target beyond `otherwise` exists.
Sadly we don't have a small reproducer so I don't think we can easily add a testcase.
|
|
|
|
The use of FxHashMap has been replaced with FxIndexMap. For
more information see https://github.com/rust-lang/rust/issues/84447
|
|
|
|
|
|
Remove `mir::CastKind::Misc`
As discussed in #97649 `mir::CastKind::Misc` is not clear, this PR addresses that by creating a new enum variant for every valid cast.
r? ````@oli-obk````
|
|
|
|
|
|
Enable doctests in compiler/ crates
Helps with https://github.com/rust-lang/rust/issues/99144
|
|
|
|
compiler/rustc_const_eval/src/interpret/validity.rs
|
|
|
|
|
|
some post-valtree cleanup
r? project-const-generics cc ```@b-naber```
|
|
Allow patterns to constrain the hidden type of opaque types
fixes #96572
reverts a revert as original PR was a perf regression that was fixed by reverting it: https://github.com/rust-lang/rust/pull/99368#issuecomment-1186587864)
TODO:
* check if https://github.com/rust-lang/rust/issues/99685 is avoided
|
|
interpret: expose generate_stacktrace without full InterpCx
In Miri we sometimes want to emit diagnostics without having a full `&InterpCx` available. To avoid duplicating code, this adds a way to get a stacktrace from an arbitrary slice of interpreter frames, that Miri can use with access to just a thread manager.
|
|
|
|
|
|
|
|
Use only ty::Unevaluated<'tcx, ()> in type system
r? `@lcnr`
|
|
r=estebank""
This reverts commit 4a742a691e7dd2522bad68b86fe2fd5a199d5561.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #46213
|
|
This is in anticipation of a new enum layout, in which the niche
optimization may be applied even when multiple variants have data.
|
|
|
|
|
|
|
|
|
|
interpret: fix unnecessary allocation in validation visitor
Should fix the perf regression introduced by https://github.com/rust-lang/rust/pull/100043.
r? `@oli-obk`
|
|
|
|
Fix a bunch of typo
This PR will fix some typos detected by [typos].
I only picked the ones I was sure were spelling errors to fix, mostly in
the comments.
[typos]: https://github.com/crate-ci/typos
|
|
This avoids a `force_allocation`
|
|
This PR will fix some typos detected by [typos].
I only picked the ones I was sure were spelling errors to fix, mostly in
the comments.
[typos]: https://github.com/crate-ci/typos
|
|
interpret: make read-pointer-as-bytes a CTFE-only error with extra information
Next step in the reaction to https://github.com/rust-lang/rust/issues/99923. Also teaches Miri to implicitly strip provenance in more situations when transmuting pointers to integers, which fixes https://github.com/rust-lang/miri/issues/2456.
Pointer-to-int transmutation during CTFE now produces a message like this:
```
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
```
r? ``@oli-obk``
|
|
Rollup of 7 pull requests
Successful merges:
- #100898 (Do not report too many expr field candidates)
- #101056 (Add the syntax of references to their documentation summary.)
- #101106 (Rustdoc-Json: Retain Stripped Modules when they are imported, not when they have items)
- #101131 (CTFE: exposing pointers and calling extern fn is just impossible)
- #101141 (Simplify `get_trait_ref` fn used for `virtual_function_elimination`)
- #101146 (Various changes to logging of borrowck-related code)
- #101156 (Remove `Sync` requirement from lint pass objects)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
CTFE: exposing pointers and calling extern fn is just impossible
The remaining "needs RFC" errors are just needlessly confusing, I think -- time to get rid of that error variant. They are anyway only reachable with miri-unleashed (if at all).
r? `@oli-obk`
|
|
|