-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support default-body trait functions with return-position impl Trait
in traits
#101679
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
6ea3e43
to
9be7558
Compare
This comment has been minimized.
This comment has been minimized.
…1-dead Only encode return-position `impl Trait` in trait when parent function has a default body Semi-blocked on rust-lang#101679, because I can't currently write a test for when we _should_ encode the type of the return-position `impl Trait` in trait, which is when a trait has a default function body, like so: ```rust trait Foo { fn bar() -> impl Sized { } } ``` Though this can land even without rust-lang#101679, since it does prevent ICEs from occuring any time you use `#![feature(return_position_impl_trait_in_trait)]` in a library, which is kind annoying.
☔ The latest upstream changes (presumably #102223) made this pull request unmergeable. Please resolve the merge conflicts. |
r=me, but needs rebase |
576805e
to
4717748
Compare
☔ The latest upstream changes (presumably #102627) made this pull request unmergeable. Please resolve the merge conflicts. |
4717748
to
7a1f25e
Compare
|
caf86ca
to
67b5f32
Compare
67b5f32
to
0eeeea9
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (0938e16): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Improvements look to be at least mostly driven by diesel, which is in its (new) noise range. Can likely be ignored. |
… r=nikomatsakis Support default-body trait functions with return-position `impl Trait` in traits Introduce a new `Trait` candidate kind for the `ImplTraitInTrait` projection candidate, which just projects an RPITIT down to its opaque type form. This is a hack until we lower RPITITs to regular associated types, after which we will need to rework how these default bodies are type-checked, so comments are left in a few places for us to clean up later. Fixes rust-lang#101665
Introduce a new
Trait
candidate kind for theImplTraitInTrait
projection candidate, which just projects an RPITIT down to its opaque type form.This is a hack until we lower RPITITs to regular associated types, after which we will need to rework how these default bodies are type-checked, so comments are left in a few places for us to clean up later.
Fixes #101665