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

Failed to resolve self in path #158

Closed
Stock84-dev opened this issue Apr 12, 2021 · 1 comment · Fixed by #160
Closed

Failed to resolve self in path #158

Stock84-dev opened this issue Apr 12, 2021 · 1 comment · Fixed by #160

Comments

@Stock84-dev
Copy link

Macro doesn't handle when self is used as path.

use async_trait::async_trait; // 0.1.48

fn bar() {}

#[async_trait]
trait Foo {
    async fn bar(&self) {
        self::bar()
    }
}
error[E0433]: failed to resolve: use of undeclared crate or module `__self`
 --> src/lib.rs:8:9
  |
8 |         self::bar()
  |         ^^^^ use of undeclared crate or module `__self`

Playground

@dtolnay
Copy link
Owner

dtolnay commented Apr 14, 2021

Good catch -- I've published a fix in 0.1.49.

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