-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Remove RefCell::get #13182
Comments
I believe that this was originally implemented to ease the transition from |
|
👍 but cc #13159 |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Aug 8, 2024
Remove some miscellaneous `#[allow]`s Some were unneeded, others were removed by fixing/removing the thing they allow changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure if this deserves a proper RFC or not, but since I consider this to be a bug I figure it makes sense here :)
I just ran into a bug where I assumed that
RefCell::get
follows our convention of.get()
methods returning a&T
pointer, and I was surprised to find thatRefCell::get
is actually:It's surprising, and it can be easily replaced with
x.borrow().clone()
if a copy is actually needed. I propose we just remove it.The text was updated successfully, but these errors were encountered: