-
Notifications
You must be signed in to change notification settings - Fork 1
Can't use &mut self
in tree nodes
#55
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
Comments
I opened a related issue on rust-lang/unsafe-code-guidelines#272, because it looks like it won't be possible to provide a safe API without allocating, which is unfortunate. |
Yup, just saw it pop up on my feed. I wish I could help in the decisions on this, but I don't (yet) know rust well enough to make that happen. I'll keep reading as new posts pop up in my feed though! |
The conclusion to the discussion was that nodes that hold intrusive collection nodes should be guarded to prevent |
OK, I think that I'm going to admit that I'm learning as I go for some of this, the aliasing rules get weird for me... |
I would postpone the thread-safe version. Rust aliasing rules mixed with thread safety is a nightmare. I think a For the tutorial, I would stick to |
OK, I'll stick with |
See the comments at #54 (comment)_ but the gist is that as @RustyYato pointed out you can't use
&mut self
as I've been using it. Fix this up.The text was updated successfully, but these errors were encountered: