Skip to content
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

Only encode return-position impl Trait in trait when parent function has a default body #101682

Merged
merged 1 commit into from
Sep 11, 2022

Conversation

compiler-errors
Copy link
Member

Semi-blocked on #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:

trait Foo {
  fn bar() -> impl Sized { }
}

Though this can land even without #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.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 11, 2022
@rust-highfive
Copy link
Collaborator

r? @fee1-dead

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 11, 2022
@compiler-errors compiler-errors changed the title Only encode return-position impl Trait in trait when trait function has a default body Only encode return-position impl Trait in trait when parent function has a default body Sep 11, 2022
@fee1-dead
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 11, 2022

📌 Commit 1335da9 has been approved by fee1-dead

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 11, 2022
@bors
Copy link
Contributor

bors commented Sep 11, 2022

⌛ Testing commit 1335da9 with merge 17a627f...

@bors
Copy link
Contributor

bors commented Sep 11, 2022

☀️ Test successful - checks-actions
Approved by: fee1-dead
Pushing 17a627f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 11, 2022
@bors bors merged commit 17a627f into rust-lang:master Sep 11, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 11, 2022
@compiler-errors compiler-errors deleted the rpitit-encode branch November 2, 2022 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants