Commit graph

127 commits

Author SHA1 Message Date
Boxy
d5bd4e233d Partially implement ConstArgHasType 2024-05-29 17:06:54 +01:00
Michael Goulet
50a5da16b8 EvalCtxt::tcx() -> EvalCtxt::interner() 2024-05-28 10:45:51 -04:00
Michael Goulet
9dc073aa4b Make EvalCtxt generic over interner 2024-05-19 19:38:28 -04:00
Michael Goulet
0f528a4c08 Uplift inspect into rustc_type_ir 2024-05-18 16:21:43 -04:00
Michael Goulet
05e0f8740a Uplift GenericArgKind, CanonicalVarValues, QueryInput
and make NestedGoals generic
2024-05-18 16:21:43 -04:00
Michael Goulet
138881b315 Uplift Goal to rustc_type_ir 2024-05-16 14:24:22 -04:00
Nicholas Nethercote
4bf20b2b55 Remove extern crate rustc_middle from rustc_trait_selection. 2024-05-13 08:20:18 +10:00
lcnr
41ebd16266 solve: replace all debug with trace 2024-05-12 03:29:50 +00:00
Nicholas Nethercote
4814fd0a4b Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
lcnr
03878c682a hir typeck: look into nested goals
uses a `ProofTreeVisitor` to look into nested
goals when looking at the pending obligations
during hir typeck. Used by closure signature
inference, coercion, and for async functions.
2024-04-25 19:44:00 +00:00
Oli Scherer
2f2350e577 Eliminate DefiningAnchor now that is just a single-variant enum 2024-04-08 15:00:27 +00:00
Oli Scherer
19bd91d128 Pass list of defineable opaque types into canonical queries 2024-04-08 15:00:26 +00:00
lcnr
0b29b71a2f cleanup + review 2024-03-18 18:13:25 +01:00
lcnr
33c274f658 move normalizes_to_hack to AliasRelate 2024-03-18 12:08:06 +01:00
lcnr
5ec9b8d778 distinguish recursion limit based overflow for diagnostics
also change the number of allowed fixpoint steps to be fixed instead
of using the `log` of the total recursion depth.
2024-02-29 10:14:02 +01:00
lcnr
eeeb9b4d31 add additional logging 2024-02-26 10:12:40 +01:00
Michael Goulet
a9dbf63087 Move trait into attr so it's greppable 2024-02-16 15:07:37 +00:00
Michael Goulet
9c25823bb4 Use extension trait derive 2024-02-16 15:07:37 +00:00
lcnr
3e3e207ad7 use alias-relate to structurally normalize in the solver 2024-02-13 05:08:51 +01:00
lcnr
bbe2f6c0b2 also try to normalize opaque types in alias-relate
with this, alias-relate treats all aliases the same way
and it can be used for structural normalization.
2024-02-13 04:47:32 +01:00
Michael Goulet
6b2a8249c1 Remove dead args from functions 2024-02-02 22:47:26 +00:00
lcnr
0d71860368 bye bye assemble_candidates_via_self_ty 2024-01-29 14:32:06 +01:00
Michael Goulet
3799568895 More comments 2024-01-10 16:29:23 +00:00
Michael Goulet
f49b0dcce2 Check reveal and can_define_opaque_ty in try_normalize_ty_recur 2024-01-10 16:21:58 +00:00
lcnr
ca718ffd2d track the source of nested goals 2023-12-18 08:47:29 +01:00
lcnr
11d16c4082 update use of feature flags 2023-12-14 15:22:37 +01:00
lcnr
6ffe36b37d refactor writeback: emit normalization errors with new solver 2023-12-12 12:20:54 +00:00
Michael Goulet
cb41509601 Uplift canonicalizer into new trait solver crate 2023-12-08 17:44:01 +00:00
lcnr
ffb4c08a81 implement and use NormalizesTo 2023-12-08 01:31:18 +01:00
Michael Goulet
334577f091 Add deeply_normalize_for_diagnostics, use it in coherence 2023-12-05 16:33:37 +00:00
lcnr
0ec2bf3e0a new solver: improve instrument annotations 2023-11-29 19:27:04 +01:00
r0cky
91aee2de15 Clean dead codes 2023-11-26 09:25:07 +08:00
lcnr
42a9b0d7ab EvalCtxt::commit_if_ok don't inherit nested goals 2023-11-24 15:22:10 +01:00
lcnr
442e112d17 update overflow handling for norm, add test 2023-11-09 11:32:51 +01:00
lcnr
e3850f404d rework alias-relate to norm(lhs) == norm(rhs) 2023-11-09 11:32:50 +01:00
lcnr
1c54494888 only instantiate opaques with rigid types 2023-11-09 11:32:12 +01:00
lcnr
1f12f1cc83 try_normalize_ty end with rigid alias on failure 2023-11-09 11:31:22 +01:00
lcnr
15ae59ba03 use global cache when computing proof trees 2023-11-02 10:41:27 +01:00
lcnr
c70ef36f2c reorder files in solve 2023-10-10 09:55:22 +00:00
lcnr
de53877f8b proof trees: use for intercrate_ambiguity_causes 2023-09-21 08:17:58 +02:00
lcnr
0cb800ec34 differentiate root and nested goals 2023-09-14 15:10:45 +02:00
lcnr
1b141b6d73 inspect: explicitly store added goals 2023-09-14 10:41:36 +02:00
lcnr
eac55eec9e dedup GoalEvaluationStep and GoalCandidate
also handle 2 panics when dumping proof trees for the whole test suite

- need to actually tell the proof tree builder about overflow
- need to handle a recursion_limit of 0 :<
2023-09-11 15:50:09 +02:00
lcnr
9eeaf1fd13 normalize in trait_ref_is_knowable in new solver 2023-08-12 20:37:53 +02:00
lcnr
ae3c353067 fix make_ambiguous_response_no_constraints
we previously had incorrect universes in the query response.
2023-08-03 14:30:13 +02:00
Michael Goulet
3ad3bb64d9
lcnr's suggestions
Co-authored-by: lcnr <rust@lcnr.de>
2023-07-24 08:37:40 -07:00
Michael Goulet
f3553691a8 Comment stuff in the new solver 2023-07-23 12:30:52 -07:00
Michael Goulet
085ae9e8b4 Add support for inherent projections 2023-07-16 21:14:38 +00:00
bors
ad963232d9 Auto merge of #113471 - compiler-errors:new-solver-norm-escaping, r=lcnr
Allow escaping bound vars during `normalize_erasing_regions` in new solver

Add `AllowEscapingBoundVars` to `deeply_normalize`, and use it in the new solver in the `query_normalize` routine.

Ideally, we'd make all `query_normalize` calls handle pass in `AllowEscapingBoundVars` individually, because really the only `query_normalize` call that needs `AllowEscapingBoundVars::Yes` is the one in `try_normalize_generic_arg_after_erasing_regions`, but I think that's kind of overkill. I am happy to be convinced otherwise, though.

r? `@lcnr`
2023-07-14 21:14:30 +00:00
Michael Goulet
4bcca3294a Allow escaping bound vars during normalize_erasing_regions in new solver 2023-07-14 15:03:21 +00:00