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

0.1.47 release causes issues with clippy::items_after_statements lint #154

Closed
tyranron opened this issue Mar 8, 2021 · 1 comment · Fixed by #155
Closed

0.1.47 release causes issues with clippy::items_after_statements lint #154

tyranron opened this issue Mar 8, 2021 · 1 comment · Fixed by #155

Comments

@tyranron
Copy link
Contributor

tyranron commented Mar 8, 2021

When I use something like:

#[async_trait]
impl MyTrait for Foo {
    async fn my_trait(&self) {
        const MAX: u16 = 128;
        // ...
    }

    async fn or_with_use(&self) {
        use MyError as E;
        // ...
    }
}

clippy::items_after_statements now complains.

Seems that the generated code has changed in the way that top-level use/const statements are not top-level anymore in sthe expanded code.

@dtolnay
Copy link
Owner

dtolnay commented Mar 8, 2021

Fixed in 0.1.48.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants