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

mut self is expended as _self #23

Closed
zhuhaow opened this issue Aug 17, 2019 · 1 comment · Fixed by #24
Closed

mut self is expended as _self #23

zhuhaow opened this issue Aug 17, 2019 · 1 comment · Fixed by #24
Labels
bug Something isn't working

Comments

@zhuhaow
Copy link

zhuhaow commented Aug 17, 2019

#[async_trait]
pub trait T {
    async fn f(self);
}

struct S {}

#[async_trait]
impl T for S {
    async fn f(mut self) {
        (&mut self).do_something();
    }
}

would give error

                                  ---- help: consider changing this to be mutable: `mut _self`
    (&mut self)
       ^^^^^^^^^^^ cannot borrow as mutable
@dtolnay
Copy link
Owner

dtolnay commented Aug 17, 2019

Thanks! Fixed in 0.1.10.

@dtolnay dtolnay added the bug Something isn't working label Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants