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

Issue with drop in https://tourofrust.com/54_en.html #534

Open
mukul1203 opened this issue Jan 7, 2025 · 0 comments
Open

Issue with drop in https://tourofrust.com/54_en.html #534

mukul1203 opened this issue Jan 7, 2025 · 0 comments

Comments

@mukul1203
Copy link

Seems like foo_a is not dropped where the comment mentions.
Rather, it is dropped at the very end of the scope, after foo_b.
Confirmed it by implementing Drop trait for struct Foo

impl Drop for Foo {
    fn drop(self:&mut Self) {
        println!("Dropping");
    }
}
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