Skip to content

Resolve async fn signature even without body (e.g., in trait) - #102161

Merged
bors merged 3 commits into
rust-lang:masterfrom
compiler-errors:issue-102138
Sep 25, 2022
Merged

Resolve async fn signature even without body (e.g., in trait)#102161
bors merged 3 commits into
rust-lang:masterfrom
compiler-errors:issue-102138

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

Fixes#102138

This "bail if no body" behavior was introduced in #69539 to fix#69401, but that ICE does not reproduce any more. The error message changes a bit, but that's all, and I don't think it's a particularly diagnostic bad regression.

@rustbotrustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 22, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @davidtwco

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2022
@compiler-errorscompiler-errors added the F-return_position_impl_trait_in_trait `#![feature(return_position_impl_trait_in_trait)]` label Sep 22, 2022
Comment threadsrc/test/ui/resolve/issue-69401-trait-fn-no-body-ty-local.rs Outdated
Comment threadsrc/test/ui/async-await/issue-102138.rs Outdated
@tmandry

Copy link
Copy Markdown
Member

r=me after comments

@compiler-errors

Copy link
Copy Markdown
ContributorAuthor

Ugh, actually this passes now and might not after the changes:

fnmain(){}traitFoo{fnfn_with_type_named_same_as_local_in_param(b:i32,b:i32);}

Let me see if I can avoid this.

@compiler-errors
compiler-errorsforce-pushed the issue-102138 branch 2 times, most recently from 3ba9fab to 271a068CompareSeptember 23, 2022 00:54
@compiler-errors

Copy link
Copy Markdown
ContributorAuthor

Okay, fixed that bug by just doing the only part of resolve that we need for AFIT.

@davidtwco

Copy link
Copy Markdown
Member

r? @tmandry

@tmandry

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Sep 23, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 271a0680197e08405c67dd0b4d4bac87ea9a28bc has been approved by tmandry

It is now in the queue for this repository.

@borsbors 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 23, 2022
@tmandry

Copy link
Copy Markdown
Member

Ugh, actually this passes now and might not after the changes:

Actually, want to add a test for this? (and r=me)

Not sure it's the behavior I would want, but it's too late for that anyway :)

@bors r-

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 23, 2022
@compiler-errors

Copy link
Copy Markdown
ContributorAuthor

@bors r=tmandry

@bors

bors commented Sep 24, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit e87fcc0 has been approved by tmandry

It is now in the queue for this repository.

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 24, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 24, 2022
…andry
Resolve async fn signature even without body (e.g., in trait)
Fixesrust-lang#102138
This "bail if no body" behavior was introduced in rust-lang#69539 to fixrust-lang#69401, but that ICE does not reproduce any more. The error message changes a bit, but that's all, and I don't think it's a particularly diagnostic bad regression.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 25, 2022
…iaskrgr
Rollup of 5 pull requests
Successful merges:
- rust-lang#102016 (implied_bounds: deal with inference vars)
- rust-lang#102161 (Resolve async fn signature even without body (e.g., in trait))
- rust-lang#102216 (rustdoc: Stabilize --diagnostic-width)
- rust-lang#102240 (rustdoc: remove unused CSS `#main-content > .line-numbers`)
- rust-lang#102242 (rustdoc: remove unused CSS `.summary`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 11b4510 into rust-lang:masterSep 25, 2022
@rustbotrustbot added this to the 1.66.0 milestone Sep 25, 2022
@compiler-errors
compiler-errors deleted the issue-102138 branch November 2, 2022 02:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-return_position_impl_trait_in_trait`#![feature(return_position_impl_trait_in_trait)]`S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

async functions in traits ICE when you try to use them internal compiler error: expected NodeId to be lowered already for res Local...

6 participants

@compiler-errors@rust-highfive@tmandry@davidtwco@bors@rustbot