Skip to content

Remove confusing 'while checking' note from opaque future type mismatches#107201

Merged
bors merged 1 commit intorust-lang:masterfrom
compiler-errors:confusing-async-fn-note
Feb 2, 2023
Merged

Remove confusing 'while checking' note from opaque future type mismatches#107201
bors merged 1 commit intorust-lang:masterfrom
compiler-errors:confusing-async-fn-note

Conversation

@compiler-errors
Copy link
Contributor

Maybe I'm just misinterpreting the wording of the note. The only value I can see in this note is that it points out where the async's opaque future is coming from, but the way it's doing it is misleading IMO.

For example:

note: while checking the return type of the `async fn`
  --> $DIR/dont-suggest-missing-await.rs:7:24
   |
LL | async fn make_u32() -> u32 {
   |                        ^^^ checked the `Output` of this `async fn`, found opaque type

We point at the type u32 in the HIR, but then say "found opaque type". We also say "while checking"... but we're typechecking a totally different function when we get this type mismatch!

r? @estebank but feel free to reassign and/or take your time reviewing this. I'd be inclined to also discuss reworking the presentation of this type mismatch to restore some of these labels in a way that makes it more clear what it's trying to point out.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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