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

lifetime-generate can't handle Arc/Rc/Box being used as receiver #1311

Open
tjhance opened this issue Oct 17, 2024 · 0 comments
Open

lifetime-generate can't handle Arc/Rc/Box being used as receiver #1311

tjhance opened this issue Oct 17, 2024 · 0 comments

Comments

@tjhance
Copy link
Collaborator

tjhance commented Oct 17, 2024

verus!{
pub struct Foo {
}

impl Foo {
    pub fn get(&self, args: &u8) -> (out: u8) { 0 }
}

fn main() {
    let foo = Foo::new();
    let shared_foo = Arc::new(foo);
    let v = shared_foo.get(&20);
}
}

work-around is to write (*shared_foo).get

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

No branches or pull requests

1 participant