| Age | Commit message (Collapse) | Author | Lines |
|
Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functions
Functions in answer:
- `Ty::is_freeze`
- `Ty::is_sized`
- `Ty::is_unpin`
- `Ty::is_copy_modulo_regions`
This allows to remove a lot of useless `.at(DUMMY_SP)`, making the code a bit nicer :3
r? `@compiler-errors`
|
|
Remove allow(rustc::potential_query_instability) in rustc_const_eval
The use of FxHashMap has been replaced with FxIndexMap.
Related to #84447
|
|
Functions in answer:
- `Ty::is_freeze`
- `Ty::is_sized`
- `Ty::is_unpin`
- `Ty::is_copy_modulo_regions`
|
|
interpret: a bit of cast cleanup
r? `@oli-obk`
|
|
Removed verbose printing from the `PrettyPrinter` when printing constants
Partially solves #94187 by completing the first step described in [this comment](https://github.com/rust-lang/rust/issues/94187#issuecomment-1282339909).
|
|
Rollup of 10 pull requests
Successful merges:
- #102951 (suggest type annotation for local statement initialed by ref expression)
- #103209 (Diagnostic derives: allow specifying multiple alternative suggestions)
- #103287 (Use a faster allocation size check in slice::from_raw_parts)
- #103416 (Name the `impl Trait` in region bound suggestions)
- #103430 (Workaround unstable stmt_expr_attributes for method receiver expressions)
- #103444 (Remove extra type error after missing semicolon error)
- #103520 (rustc_middle: Rearrange resolver outputs structures slightly)
- #103533 (Use &self instead of &mut self for cast methods)
- #103536 (Remove `rustc_driver::set_sigpipe_handler()`)
- #103542 (Pinning tests for some `macro_rules!` errors discussed in the lang meeting)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Add eval hack in `super_relate_consts` back
Partially reverts 01adb7e98d5656c06497f33dd2747df144e78356.
This extra eval call *still* needs to happen, for example, in `normalize_param_env_or_error` when a param-env predicate has an unnormalized constant, since the param-env candidates never get normalized during candidate assembly (everywhere else we can assume that they are normalized fully).
r? `@lcnr,` though I feel like I've assigned quite a few PRs to you in the last few days, so feel free to reassign to someone else familiar with this code if you're busy!
cc #103243 (fixes the issue, but don't want to auto-close that until a backport is performed).
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|