about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
AgeCommit message (Collapse)AuthorLines
2022-11-25Make the ICEs in the mir typechecker have more spans helpfulOli Scherer-0/+1
2022-11-25More manual formattingOli Scherer-5/+5
2022-11-25`rustc_layout_scalar_valid_range` can be applied to scalar pairs and affects ↵Oli Scherer-9/+1
teh first scalar
2022-11-25Simplify a bunch of trait ref obligation creationsOli Scherer-22/+9
2022-11-24Avoid `GenFuture` shim when compiling async constructsArpad Borsos-10/+11
Previously, async constructs would be lowered to "normal" generators, with an additional `from_generator` / `GenFuture` shim in between to convert from `Generator` to `Future`. The compiler will now special-case these generators internally so that async constructs will *directly* implement `Future` without the need to go through the `from_generator` / `GenFuture` shim. The primary motivation for this change was hiding this implementation detail in stack traces and debuginfo, but it can in theory also help the optimizer as there is less abstractions to see through.
2022-11-22Use `tcx.require_lang_item` instead of unwrappingMaybe Waffle-4/+4
2022-11-21Stop passing the self-type as a separate argument.Oli Scherer-1/+1
2022-11-21Add helper to create the trait ref for a lang itemOli Scherer-4/+2
2022-11-21Allow iterators instead of requiring slices that will get turned into iteratorsOli Scherer-1/+1
2022-11-21Assert that various types have the right amount of generic args and fix the ↵Oli Scherer-4/+1
sites that used the wrong amount
2022-11-21Rollup merge of #104595 - compiler-errors:poly-existential-predicate, r=lcnrMatthias Krüger-1/+1
Add `PolyExistentialPredicate` type alias Wrapping `ExistentialPredicate`s in a binder is very common, and this alias already exists for the `PolyExistential{TraitRef,Projection}` types.
2022-11-20Rollup merge of #104564 - RalfJung:either, r=oli-obkMatthias Krüger-68/+81
interpret: use Either over Result when it is not representing an error condition r? `@oli-obk`
2022-11-19Auto merge of #102795 - lukas-code:constify-is-aligned-via-align-offset, ↵bors-53/+140
r=oli-obk Constify `is_aligned` via `align_offset` Alternative to https://github.com/rust-lang/rust/pull/102753 Make `align_offset` work in const eval (and not always return `usize::MAX`) and then use that to constify `is_aligned{_to}`. Tracking Issue: https://github.com/rust-lang/rust/issues/104203
2022-11-19Revert "don't call `align_offset` during const eval, ever"Lukas Markeffsky-90/+44
This reverts commit f3a577bfae376c0222e934911865ed14cddd1539.
2022-11-19fix const `align_offset` implementationLukas Markeffsky-3/+6
2022-11-19replace potential ICE with graceful error (`no_core` only)Lukas Markeffsky-3/+2
2022-11-19don't call `align_offset` during const eval, everLukas Markeffsky-43/+88
2022-11-19make const `align_offset` usefulLukas Markeffsky-23/+106
2022-11-19unify inherent impls of `CompileTimeEvalContext`Lukas Markeffsky-46/+44
2022-11-19constify `exact_div` intrinsicLukas Markeffsky-0/+5
2022-11-19Rollup merge of #104593 - compiler-errors:rpitit-object-safety-spans, ↵Matthias Krüger-1/+1
r=fee1-dead Improve spans for RPITIT object-safety errors No reason why we can't point at the `impl Trait` that causes the object-safety violation. Also [drive-by: Add is_async fn to hir::IsAsync](https://github.com/rust-lang/rust/pull/104593/commits/c4165f3a965e258531928180195637455299c6f3), which touches clippy too.
2022-11-19Rollup merge of #104411 - lcnr:bivariance-nll, r=compiler-errorsDylan DPC-60/+70
nll: correctly deal with bivariance fixes #104409 when in a bivariant context, relating stuff should always trivially succeed. Also changes the mir validator to correctly deal with higher ranked regions. r? types cc ``@RalfJung``
2022-11-19drive-by: PolyExistentialPredicateMichael Goulet-1/+1
2022-11-19drive-by: Add is_async fn to hir::IsAsyncMichael Goulet-1/+1
2022-11-18review feedbackRalf Jung-7/+7
2022-11-18interpret: use Either over Result when it is not representing an error conditionRalf Jung-68/+81
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