]> git.lizzy.rs Git - rust.git/commit - compiler/rustc_parse/src/lexer/unicode_chars.rs
Rollup merge of #107061 - compiler-errors:new-solver-new-candidates-3, r=lcnr
authorMichael Goulet <michael@errs.io>
Sat, 21 Jan 2023 02:33:22 +0000 (21:33 -0500)
committerGitHub <noreply@github.com>
Sat, 21 Jan 2023 02:33:22 +0000 (21:33 -0500)
commit3452104715281e1e52791dfe7c94622852ab1143
treefea395c277dbc3b0f5bcf9f4db5a47f4826cc821
parentd26c88c75231ab90b522fb061383f8e0156f1f20
parented6aebbfecb56ae9ec2702572b70d6e350433de2
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```