Skip to content

Improve libcore/cell.rs docs #21564

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

Merged
merged 1 commit into from
Jan 27, 2015
Merged

Improve libcore/cell.rs docs #21564

merged 1 commit into from
Jan 27, 2015

Conversation

steveklabnik
Copy link
Member

No description provided.

@rust-highfive
Copy link
Contributor

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

//! Values of the `Cell<T>` and `RefCell<T>` types may be mutated through shared references (i.e.
//! the common `&T` type), whereas most Rust types can only be mutated through unique (`&mut T`)
//! references. We say that `Cell<T>` and `RefCell<T>` provide 'interior mutability', in contrast
//! with typical Rust types that exhibit 'inherited mutability'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this hold off on reformatting docs? It's tough to see what's changed here and otherwise this is just churning docs.

@alexcrichton
Copy link
Member

@bors: r+ edc6781

@sanxiyn
Copy link
Member

sanxiyn commented Jan 25, 2015

@bors rollup

/// can cause segfaults. Immutable static items containing `UnsafeCell<T>`
/// instances are still useful as read-only initializers, however, so we do not
/// forbid them altogether.
/// Although it is possible to put an `UnsafeCell<T>` into static item, it is not permitted to take
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steveklabnik Is this still true as of today, after introducing const? I think the static semantics have changed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure

@bors
Copy link
Collaborator

bors commented Jan 27, 2015

⌛ Testing commit edc6781 with merge e365e4c...

barosl added a commit to barosl/rust that referenced this pull request Jan 27, 2015
@bors bors merged commit edc6781 into rust-lang:master Jan 27, 2015
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

Successfully merging this pull request may close these issues.

7 participants