Michael Goulet
8c67ecd124
Use elaborated item bounds for alias types
2023-02-09 17:16:47 +00:00
Michael Goulet
2b70cbb8a5
Rename PointerSized to PointerLike
2023-02-07 19:05:53 +00:00
Wilco Kusee
5fd4f5bceb
Add candidates for DiscriminantKind builtin
2023-02-01 16:43:01 +01:00
Michael Goulet
f7fc0b7121
nits
2023-01-30 19:19:07 +00:00
Michael Goulet
c24844048f
Trait upcasting support in new solver
2023-01-30 19:11:01 +00:00
Michael Goulet
085a48e798
Implement unsizing in the new trait solver
2023-01-30 19:11:01 +00:00
Matthias Krüger
70fc114ccc
Rollup merge of #107401 - lenko-d:remove_the_usize_field_from_CandidateSource_AliasBound, r=compiler-errors
...
remove the usize field from CandidateSource::AliasBound
Fixes [#107380 ](https://github.com/rust-lang/rust/issues/107380 )
2023-01-29 06:14:18 +01:00
Lenko Donchev
d3cf813b8d
Use field-less variant for AliasBound.
2023-01-28 06:00:27 -06:00
Lenko Donchev
d4a816c813
remove the usize field from CandidateSource::AliasBound
2023-01-27 22:50:24 -06:00
Matthias Krüger
ab769a0bac
Rollup merge of #107344 - compiler-errors:new-solver-tweaks, r=lcnr
...
Minor tweaks in the new solver
1. `InferCtxt::probe` is not needed in `compute_subtype_goal` and `compute_well_formed_goal`.
2. Add a handful of comments.
3. Add a micro-optimization in `consider_assumption` where we check the def-ids of the assumption and goal match before instantiating any binders.
r? ``@lcnr``
2023-01-28 05:20:19 +01:00
Michael Goulet
0654374750
Add some comments
2023-01-27 20:06:12 +00:00
Camille GILLOT
1974b6b68d
Introduce GeneratorWitnessMIR.
2023-01-27 18:58:44 +00:00
Matthias Krüger
dd08f35e87
Rollup merge of #107286 - compiler-errors:new-solver-deny-infers, r=lcnr
...
ICE in new solver if we see an inference variable
By construction, we do not expect to see any `ty::Infer(ty::TyVar(_))` inference types in the solver (we treat this as ambiguous, since we need to be able to structurally resolve the self type at least one layer to assemble candidates for it). Additionally, since we're doing no freshening, we also don't expect to see any fresh vars of any kind in the solver.
Let's make that an ICE so we can catch any mistakes.
When #107282 lands, we should also ICE there too if we see a non-int/float infer.
r? `@lcnr`
2023-01-26 06:15:29 +01:00
Michael Goulet
0f24e11ef5
ICE in new solver if we see an inference variable
2023-01-26 03:18:36 +00:00
Michael Goulet
d600b94ebb
Implement Generator and Future
2023-01-26 03:15:36 +00:00
Boxy
430dab0b42
implement builtin candidate
2023-01-24 23:24:30 +00:00
Michael Goulet
444cbcd729
Address goal nits
2023-01-21 17:15:00 +00:00
Michael Goulet
ed6aebbfec
trait solver: Implement Fn traits and tuple trait
2023-01-19 16:15:28 +00:00
Michael Goulet
69890b2df4
trait solver: PointerSized
2023-01-19 16:15:28 +00:00
Michael Goulet
aee75f25cb
Assert goal is fully normalized during assemble
2023-01-19 16:15:28 +00:00
Michael Goulet
c9c8e294d2
HACK: self ty ambiguity hack
2023-01-19 15:31:57 +00:00
Michael Goulet
685c32fd85
Sized, Copy/Clone
2023-01-18 14:59:15 +00:00
Michael Goulet
45aa5c0f90
Auto and alias traits
2023-01-18 14:59:15 +00:00
Michael Goulet
3d87a8e848
Assemble object bound candidates
2023-01-18 14:28:14 +00:00
Michael Goulet
b84b1da2db
Canonicalize trait solver response inside probe
2023-01-18 14:28:14 +00:00
lcnr
660c28391c
remove assembly context and impl a bit more
2023-01-18 08:11:15 +01:00
lcnr
bf7dbff921
instantiate canonical vars eagerly
2023-01-18 08:11:13 +01:00
Michael Goulet
5a31d5ebe2
Implement dummy query responses and a jank instantiate
2023-01-12 21:01:34 +00:00
lcnr
750bf36c33
dedup assembly
2022-12-20 07:30:24 +00:00