Skip to content

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

Closed as not planned
Closed as not planned
@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions