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

Typo in RefCell's section (immutable -> mutable) #114555

Closed
somename-123 opened this issue Aug 6, 2023 · 1 comment
Closed

Typo in RefCell's section (immutable -> mutable) #114555

somename-123 opened this issue Aug 6, 2023 · 1 comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools

Comments

@somename-123
Copy link

Location

https://doc.rust-lang.org/std/cell/index.html#refcellt

An immutable reference to a RefCell’s inner value (&T) can be obtained with borrow, and a mutable borrow (&mut T) can be obtained with borrow_mut. When these functions are called, they first verify that Rust’s borrow rules will be satisfied: any number of *immutable* borrows are allowed or a *single immutable* borrow is allowed, but never both. If a borrow is attempted that would violate these rules, the thread will panic.

Summary

any number of immutable borrows are allowed or a single mutable (immutable -> mutable) borrow is allowed, but never both

@somename-123 somename-123 added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Aug 6, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 6, 2023
@compiler-errors
Copy link
Member

This was fixed in #112206.

@compiler-errors compiler-errors closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2023
@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools
Projects
None yet
Development

No branches or pull requests

4 participants