Michael Goulet
90423a7abb
Uplift elaboration
2024-07-07 11:28:01 -04:00
Michael Goulet
dfc02d28c7
Rollup merge of #127386 - compiler-errors:uplift-outlives-components, r=lcnr
...
Uplift outlives components to `rustc_type_ir`
We need this to uplift `push_outlives_components`, since the elaborator uses `push_outlives_components` to elaborate type outlives obligations and I want to uplift elaboration.
This ends up reworking and inlining a fair portion of the `GenericArg::walk_shallow` function, whose only callsite was this one. I believe I got the logic correct, but may be worthwhile to look at it closely just in case. Unfortunately github was too dumb to understand that this is a rename + change -- I could also rework the git history to split the "copy the file over" part from the actual logical changes if that makes this easier to review.
r? lcnr
2024-07-06 14:55:23 -04:00
Michael Goulet
cc6c5de39d
Import via rustc_type_ir::outlives
...
We could use rustc_middle::ty::outlives I guess?
2024-07-06 10:47:46 -04:00
Michael Goulet
99429a6a18
Split out transitive_bounds_that_define_assoc_item
2024-07-05 20:21:16 -04:00
Michael Goulet
e5412da723
Supertrait elaboration doesn't need to use Predicates
2024-07-05 15:51:53 -04:00
Michael Goulet
81c2c57519
Make queries more explicit
2024-06-27 12:03:57 -04:00
Michael Goulet
2c0348a0d8
Stop passing traitref/traitpredicate by ref
2024-06-12 20:57:24 -04:00
Michael Goulet
2025e44ef8
to_opt_poly_X_pred -> as_X_clause
2024-05-17 12:58:33 -04:00
Michael Goulet
412dc28d6a
Make P parameter explicit
2024-05-16 14:23:47 -04:00
Michael Goulet
11ec3eca74
Rename ToPredicate for Upcast
2024-05-16 14:23:47 -04:00
Michael Goulet
9108294a6c
More rename fallout
2024-05-10 10:42:57 -04:00
Michael Goulet
534e267d48
Rename some ObligationCauseCode variants
2024-05-10 10:42:57 -04:00
Michael Goulet
4bde8a8f4b
Remove glob imports for ObligationCauseCode
2024-05-10 10:42:56 -04:00
Michael Goulet
127e42d33b
Use != Positive rather than == Negative
...
Feels more complete, and for ImplPolarity has the side-effect of making
sure we also handle reservation impls correctly
2024-03-22 11:16:57 -04:00
Michael Goulet
4b87c0b9c9
Split out ImplPolarity and PredicatePolarity
2024-03-22 11:16:56 -04:00
Shoyu Vanilla
3856df059e
Dejargnonize subst
2024-02-12 15:46:35 +09:00
lcnr
3978f545ba
add unused NormalizesTo predicate
2023-12-07 17:52:51 +01:00
Michael Goulet
93298ee0dd
Remove ClosureKind predicate kind
2023-11-21 18:35:45 +00:00
Michael Goulet
8f267e2b87
Make regionck care about placeholders in outlives components
2023-11-19 19:12:20 +00:00
lcnr
86fa1317a3
rename ReLateBound to ReBound
...
other changes:
- `Region::new_late_bound` -> `Region::new_bound`
- `Region::is_late_bound` -> `Region::is_bound`
2023-11-13 14:13:54 +00:00
Michael Goulet
232f3146b3
Make sure that non-pretty-printing usages are using the correct elaborator
2023-10-18 03:05:38 +00:00
Michael Goulet
910bb4fe25
Simplify transitive_bounds_that_define_assoc_item
2023-10-18 03:00:51 +00:00
Deadbeef
4fec845c3f
Remove constness from TraitPredicate
2023-08-02 15:38:00 +00:00
Maybe Waffle
eabd306265
Document PredicateSet::insert
...
I always forget what the `bool` means :/
2023-07-19 09:44:40 +00:00
Boxy
12138b8e5e
Move TyCtxt::mk_x to Ty::new_x where applicable
2023-07-05 20:27:07 +01:00
Michael Goulet
0c73b41cd6
remove TypeWellFormedFromEnv
2023-07-03 21:40:04 +00:00
Michael Goulet
aafc801d69
Make the Elaboratable trait take clauses
2023-06-29 00:46:41 +00:00
Michael Goulet
374173cd99
TypeWellFormedInEnv
2023-06-26 23:12:04 +00:00
Michael Goulet
fbdef58414
Migrate predicates_of and caller_bounds to Clause
2023-06-26 23:12:03 +00:00
Michael Goulet
2fa796a3c7
Expect clause more
2023-06-22 18:34:24 +00:00
Michael Goulet
46a650f4e0
Migrate item_bounds to ty::Clause
2023-06-22 18:34:23 +00:00
Michael Goulet
21226eefb2
Fully fledged Clause type
2023-06-19 15:46:08 +00:00
Michael Goulet
fca56a8d2c
s/Clause/ClauseKind
2023-06-19 14:57:42 +00:00
Michael Goulet
6594c75449
Move ConstEvaluatable to Clause
2023-06-17 21:27:13 +00:00
Michael Goulet
52d3fc93f2
Move WF goal to clause
2023-06-17 21:20:20 +00:00
bors
0dddad0dc5
Auto merge of #111161 - compiler-errors:rtn-super, r=cjgillot
...
Support return-type bounds on associated methods from supertraits
Support `T: Trait<method(): Bound>` when `method` comes from a supertrait, aligning it with the behavior of associated type bounds (both equality and trait bounds).
The only wrinkle is that I have to extend `super_predicates_that_define_assoc_type` to look for *all* items, not just `AssocKind::Ty`. This will also be needed to support `feature(associated_const_equality)` as well, which is subtly broken when it comes to supertraits, though this PR does not fix those yet. There's a slight chance there's a perf regression here, in which case I guess I could split it out into a separate query.
2023-05-07 11:18:22 +00:00
Michael Goulet
fef2f5b815
Rename things to reflect that they're not item specific
2023-05-03 20:13:32 +00:00
Michael Goulet
03469c3f2e
Make negative trait bounds work with the old trait solver
2023-05-02 22:36:25 +00:00
Michael Goulet
7ec72efe10
Allow the elaborator to only filter to real supertraits
2023-04-11 17:45:42 +00:00
Michael Goulet
25c342f30a
Split implied and super predicate queries
2023-04-11 17:45:42 +00:00
Michael Goulet
3dab259cb9
Split super_predicates_that_define_assoc_type query from super_predicates_of
2023-04-11 17:40:54 +00:00
Michael Goulet
2cd0729d63
Get rid of elaborate_trait_ref{s} too
2023-04-06 23:30:22 +00:00
Michael Goulet
758bedc104
Make elaborator generic
2023-04-06 23:30:22 +00:00
Michael Goulet
1ce4b37900
Don't elaborate non-obligations into obligations
2023-03-26 20:33:54 +00:00
Michael Goulet
3a36a093dd
Rename AliasEq -> AliasRelate
2023-03-23 05:56:40 +00:00
Patrik Kårlin
3d34538f5d
rustc_infer: Consolidate obligation elaboration de-duplication
2023-02-24 11:32:41 +01:00
Boxy
e919d7e348
Add Clause::ConstArgHasType variant
2023-02-17 09:30:33 +00:00
Alan Egerton
55d449fe0a
Clarify DerivedObligationCause may hold alias id
2023-02-16 22:12:15 +00:00
Boxy
23ab2464be
add AliasEq to PredicateKind
2023-02-10 13:44:46 +00:00
Nathan Fenner
2a67e99d7d
Point at specific field in struct literal when trait fulfillment fails
2023-01-23 13:37:58 -08:00