1
Fork 0
rust/compiler/rustc_trait_selection/src
Michael Goulet 3452104715
Rollup merge of #107061 - compiler-errors:new-solver-new-candidates-3, r=lcnr
Implement some more new solver candidates and fix some bugs

First, fix some bugs:

1. `IndexVec::drain_enumerated(a..b)` does not give us an iterator of index keys + items enumerated from `a..b`, but from `0..(b-a)`... That caused a bug. See first commit for the fix.
2. Implement the `_: Trait` ambiguity hack. I put it in assemble, let me know if it should live elsewhere. This is important, since we otherwise consider `_: Sized` to have no solutions, and nothing passes!
3. Swap `Ambiguity` and `Unimplemented` cases for the new solver. Sorry for accidentally swapping them 😄
4. Check GATs' own predicates during projection confirmation.

Then implement a few builtin traits:

5. Implement `PointerSized`. Pretty independent.
6. Implement `Fn` family of traits for fnptr, fndef, and closures. Closures are currently broken because `FulfillCtxt::relationships` is intentionally left unimplemented. See comment in the test.

r? ```@lcnr```
2023-01-20 21:33:22 -05:00
..
solve trait solver: Implement Fn traits and tuple trait 2023-01-19 16:15:28 +00:00
traits Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnr 2023-01-20 21:29:52 +00:00
errors.rs Move autoderef to rustc_hir_analysis 2023-01-11 20:12:57 +00:00
infer.rs Simplify some canonical type alias names 2023-01-03 01:16:10 +00:00
lib.rs update cache 2023-01-18 08:09:01 +01:00