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

Many break-outside-of-loop false negatives #14503

Closed
jplatte opened this issue Apr 6, 2023 · 3 comments · Fixed by #14509
Closed

Many break-outside-of-loop false negatives #14503

jplatte opened this issue Apr 6, 2023 · 3 comments · Fixed by #14509
Assignees
Labels
A-diagnostics diagnostics / error reporting A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@jplatte
Copy link
Contributor

jplatte commented Apr 6, 2023

It looks like #14486, while it fixed type-mismatch errors, introduced a new kind of error on ?s inside async fnsinside closures or async blocks that occur within anasync fn`:

Screenshot_2023-04-06_091317

rust-analyzer version: 0.4.1465-standalone

rustc version: 1.69.0-beta.1 (b955c8271 2023-03-06)

relevant settings: -

cc @HKalbasi

@jplatte jplatte added the C-bug Category: bug label Apr 6, 2023
@lnicola lnicola added A-diagnostics diagnostics / error reporting A-mir labels Apr 6, 2023
@Veykril Veykril added A-ty type system / type inference / traits / method resolution and removed A-mir labels Apr 6, 2023
@Veykril
Copy link
Member

Veykril commented Apr 6, 2023

I am surprised we emit these here at all since they come from desugared things

@Veykril Veykril self-assigned this Apr 6, 2023
@Veykril
Copy link
Member

Veykril commented Apr 6, 2023

Does this happen for all your async functions? Are attributes involved? I can't reproduce htis with a simple

async fn f() {
    None::<()>.await?;
}

@jplatte
Copy link
Contributor Author

jplatte commented Apr 6, 2023

Aha, yes attributes are involved in many places. Though I've also found some closures without attributes where this happens. It seems like both closures inside async fn and async blocks inside async fn (often from #[tracing::instrument]) are triggering this.

Screenshot_2023-04-06_135440

(first error disappears when removing instrument, all errors disappear when removing async before fn)

Screenshot_2023-04-06_135710

(error disappears when removing async before fn)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics diagnostics / error reporting A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants