about summary refs log tree commit diff
path: root/compiler/rustc_const_eval
AgeCommit message (Collapse)AuthorLines
2022-11-18review feedbackRalf Jung-7/+7
2022-11-18interpret: use Either over Result when it is not representing an error conditionRalf Jung-68/+82
2022-11-17Rollup merge of #104483 - oli-obk:santa-clauses-make-goals, r=compiler-errorsMatthias Krüger-1/+4
Convert predicates into Predicate in the Obligation constructor instead of having almost all callers do that. This reduces a bit of boilerplate, and also paves the way for my work towards https://github.com/rust-lang/compiler-team/issues/531 (as it makes it easier to accept both goals and clauses where right now it only accepts predicates).
2022-11-16fix #104390, fix ICE in in_operand for ty erroryukang-1/+5
2022-11-16Convert predicates into Predicate in the Obligation constructorOli Scherer-1/+4
2022-11-16cleanup and dedupe CTFE and Miri error reportingRalf Jung-57/+79
2022-11-15Auto merge of #104054 - RalfJung:byte-provenance, r=oli-obkbors-25/+20
interpret: support for per-byte provenance Also factors the provenance map into its own module. The third commit does the same for the init mask. I can move it in a separate PR if you prefer. Fixes https://github.com/rust-lang/miri/issues/2181 r? `@oli-obk`
2022-11-15use `ocx` type relation routineslcnr-3/+3
2022-11-15add comment about opaque typeslcnr-0/+3
2022-11-15mv utility methods into separate modulelcnr-55/+65
2022-11-15nll: correctly deal with bivariancelcnr-47/+44
2022-11-14Rollup merge of #104356 - RalfJung:interpret-check-mplace, r=oli-obkMatthias Krüger-9/+9
interpret: make check_mplace public This helps avoid code duplication in https://github.com/rust-lang/miri/pull/2661.
2022-11-14Rollup merge of #104349 - rustaceanclub:master, r=oli-obkMatthias Krüger-1/+1
fix some typos in comments
2022-11-14assert that we are (de)seiralizing ProvenanceMap correctlyRalf Jung-2/+2
2022-11-13interpret: make check_mplace publicRalf Jung-9/+9
2022-11-13add is_sized method on Abi and Layout, and use itRalf Jung-12/+12
2022-11-13fix some typos in commentscui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-11-08Rollup merge of #103865 - compiler-errors:fallback-has-occurred-tracking, ↵Dylan DPC-2/+1
r=eholk Move `fallback_has_occurred` state tracking to `FnCtxt` Removes a ton of callsites that defaulted to `false`
2022-11-06move InitMask to its own moduleRalf Jung-3/+3
2022-11-06interpret: support for per-byte provenanceRalf Jung-22/+17
2022-11-06Move fallback_has_occurred to FnCtxtMichael Goulet-2/+1
2022-11-06Auto merge of #103975 - oli-obk:tracing, r=jackh726bors-0/+3
Some tracing and comment cleanups Pulled out of https://github.com/rust-lang/rust/pull/101900 to see if that is the perf impact
2022-11-05Rollup merge of #103868 - compiler-errors:trait-engine-less, r=jackh726Matthias Krüger-27/+15
Use `TraitEngine` (by itself) less Replace `TraitEngine` in favor of `ObligationCtxt` or `fully_solve_*`, improving code readability.
2022-11-04Some tracing and comment cleanupsOli Scherer-0/+3
2022-11-04Rollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnrMatthias Krüger-5/+4
Improve use of ErrorGuaranteed and code cleanup Part of #103874
2022-11-03remove 'delay_span_bug' following 'references_error'yukang-3/+2
2022-11-02deprecate DelaySpanBugEmitted and use ErrorGuaranteed directlyyukang-2/+2
2022-11-02Use TraitEngine lessMichael Goulet-27/+15
2022-11-01Format dyn Trait better in type_name intrinsicMichael Goulet-10/+2
2022-11-01Rollup merge of #103729 - RalfJung:align-of-val-packed, r=oli-obkDylan DPC-1/+8
interpret: fix align_of_val on packed types Fixes https://github.com/rust-lang/miri/issues/2632 r? `@oli-obk`
2022-11-01Rollup merge of #103798 - RalfJung:type_name, r=oli-obkYuki Okushi-9/+15
interpret: move type_name implementation to an interpreter-independent helper file This should avoid pinging rust-lang/miri each time that file changes, which is really not necessary. r? `@oli-obk`
2022-10-31interpret: move type_name implementation to an interpreter-independent ↵Ralf Jung-9/+15
helper file
2022-10-31Rollup merge of #103603 - camsteffen:refactor-lang, r=oli-obkDylan DPC-9/+11
Lang item cleanups Various cleanups related to lang items.
2022-10-30All verbosity checks in `PrettyPrinter` now go through ↵Sarthak Singh-4/+7
`PrettyPrinter::should_print_verbose`
2022-10-29Simplify lang item groupsCameron Steffen-9/+11
2022-10-29interpret: fix align_of_val on packed typesRalf Jung-1/+8
2022-10-29Rollup merge of #103625 - WaffleLapkin:no_tyctxt_dogs_allowed, r=compiler-errorsGuillaume Gomez-15/+8
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`
2022-10-28Auto merge of #102674 - CastilloDel:master, r=oli-obkbors-15/+14
Remove allow(rustc::potential_query_instability) in rustc_const_eval The use of FxHashMap has been replaced with FxIndexMap. Related to #84447
2022-10-27Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functionsMaybe Waffle-15/+8
Functions in answer: - `Ty::is_freeze` - `Ty::is_sized` - `Ty::is_unpin` - `Ty::is_copy_modulo_regions`
2022-10-26Auto merge of #103572 - Dylan-DPC:rollup-a8bnxrw, r=Dylan-DPCbors-33/+34
Rollup of 6 pull requests Successful merges: - #95710 (Stabilize arbitrary_enum_discriminant, take 2) - #102706 (Support excluding the generation of the standalone docs) - #103428 (Removed verbose printing from the `PrettyPrinter` when printing constants) - #103543 (Update books) - #103546 (interpret: a bit of cast cleanup) - #103554 (rustdoc: add visible focus outline to rustdoc-toggle) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-26Rollup merge of #103546 - RalfJung:cast, r=oli-obkDylan DPC-31/+30
interpret: a bit of cast cleanup r? `@oli-obk`
2022-10-26Rollup merge of #103428 - SarthakSingh31:issue-94187, r=compiler-errorsDylan DPC-2/+4
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).
2022-10-26Auto merge of #103284 - compiler-errors:const-sad, r=oli-obkbors-56/+16
Revert "Unify tcx.constness and param env constness checks" Too much of a perf regression https://github.com/rust-lang/rust/pull/102975#issuecomment-1282702513, and an attempt in #103263 didn't fix it except for just a tiny bit. This change isn't really needed (see https://github.com/rust-lang/rust/pull/102830#issuecomment-1272514096), so this should be an easy revert.
2022-10-26Auto merge of #103562 - Dylan-DPC:rollup-sheepp5, r=Dylan-DPCbors-4/+4
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
2022-10-26Rollup merge of #103533 - jachris:cast-without-mut, r=oli-obkDylan DPC-4/+4
Use &self instead of &mut self for cast methods r? ``@oli-obk``
2022-10-26Auto merge of #103279 - compiler-errors:normalize-hack-back, r=lcnrbors-1/+8
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).
2022-10-25interpret: a bit of cast cleanupRalf Jung-31/+30
2022-10-25Use &self instead of &mut self for cast methodsJannis Christopher Köhl-4/+4
2022-10-25Auto merge of #102340 - JakobDegen:pass-manager-simplification, r=oli-obkbors-4/+0
Split phase change from `MirPass` The main goal here is to simplify the pass manager logic. `MirPass` no longer contains the `phase_change` method, and `run_passes` instead accepts an `Option<PhaseChange>`. The hope is that this addresses the comments (and maybe perf regression) from #99102 . r? `@oli-obk` cc `@RalfJung`
2022-10-25Rollup merge of #103122 - ouz-a:mir-technical-debt, r=oli-obkDylan DPC-25/+63
Remove misc_cast and validate types when casting Continuing our work in #102675 r? ````@oli-obk````