Skip to content

Unhelpful suggestion for “remove the .await #101715

Closed
@GoldsteinE

Description

@GoldsteinE

Given the following code (playground):

struct S;

impl S {
    fn very_long_method_name_the_longest_method_name_in_the_whole_universe(self) {}
}

async fn foo() {
    S.very_long_method_name_the_longest_method_name_in_the_whole_universe()
        .await
}

The current output is:

...
help: remove the `.await`
  |
8 -     S.very_long_method_name_the_longest_method_name_in_whole_universe()
8 +     S.very_long_method_name_the_longest_method_name_in_whole_universe()
  |

Ideally the output should look like:

...
help: remove the `.await`
  |
9 -         .await
  |

It’s reproducible on playground’s latest stable, beta and nightly (1.63.0, 1.64.0-beta.6 and 1.65.0-nightly (2022-09-11 59e7a30)) respectively.

Possibly related to #94877?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions