Commit graph

235 commits

Author SHA1 Message Date
kennytm
ee9425214b
Rollup merge of #48474 - christianpoveda:new_cell_docs, r=steveklabnik
New Cell docs

This fixes https://github.com/rust-lang/rust/issues/44061
2018-03-06 20:52:35 +08:00
Mazdak Farrokhzad
f8ebb3f09f fix wording on panics in binary operators on RefCells" 2018-02-27 15:48:50 +01:00
Christian Poveda
9091584def some grammar corrections 2018-02-26 11:14:40 -05:00
Christian Poveda
397ce8a1ae fixed links 2018-02-25 09:39:21 -05:00
Christian Poveda
7ded7f764c corrected grammar errors 2018-02-24 18:06:01 -05:00
Christian Poveda
ce3ad263ff added link to sync containers 2018-02-24 18:04:08 -05:00
Christian Poveda
43de01f97e cleaned trailing whitespaces 2018-02-23 15:12:28 -05:00
Christian Poveda
58d1f83952 remove redundant info 2018-02-23 13:00:26 -05:00
Christian Poveda
f9e049afc5 add info about sync 2018-02-23 12:57:18 -05:00
Christian Poveda
238bb38a94 First version 2018-02-22 13:53:59 -05:00
Mazdak Farrokhzad
bde855518b RefCell: document panics in Clone, PartialEq, PartialOrd, Ord. Fixes #47400 2018-02-20 05:52:26 +01:00
varkor
4829d502cc Make UnsafeCell::into_inner safe
This fixes #35067. It will require a Crater run as discussed in that
issue.
2018-01-05 01:11:20 +00:00
kennytm
c3241b504f Rollup merge of #46517 - notriddle:patch-2, r=BurntSushi
Stablize RefCell::{replace, swap}

RefCell::replace_with is not stablized in this PR, since it wasn't part of the RFC.

CC #43570
2017-12-20 21:21:51 +08:00
Ariel Ben-Yehuda
66c032cb2d more comments 2017-12-06 00:51:47 +02:00
Ariel Ben-Yehuda
37df5e0b91 adjust libcore 2017-12-06 00:34:02 +02:00
Michael Howell
19775f73a3
Update cell.rs 2017-12-05 13:15:35 -07:00
Michael Howell
28a19bfa7f
Move replace_with to its own feature flag
I'm not allowed to have the same feature flag associated with multiple stability levels.
2017-12-05 12:03:57 -07:00
Michael Howell
fd064e041a
Stablize RefCell::{replace, swap}
RefCell::replace_with is not stablized in this PR, since it wasn't part of the RFC.
2017-12-05 09:07:12 -07:00
Simon Sapin
6c5f53e65e Stabilize const-calling existing const-fns in std
Fixes #46038
2017-11-26 23:43:44 +01:00
Havvy
2d02772993 Add RefCell<T>::replace_with 2017-11-06 18:53:23 -08:00
Alex Crichton
ca18537197 Bump to 1.23 and update bootstrap
This commit updates the bootstrap compiler, bumps the version to 1.23, updates
Cargo, updates books, and updates crates.io dependencies
2017-10-26 13:59:18 -07:00
Alex Burka
681e5da61e change #![feature(const_fn)] to specific gates 2017-09-16 15:53:02 +00:00
lukaramu
49ee9f3f08 Fix inconsistent doc headings
This fixes headings reading "Unsafety" and "Example", they should be
"Safety" and "Examples" according to RFC 1574.
2017-08-24 18:42:53 +02:00
Anthony Clays
fa346fc5d6
Fixed typo in RefCell::get_mut 2017-08-17 10:57:17 +02:00
bors
f1ca76c497 Auto merge of #43574 - notriddle:master, r=sfackler
Implement `RefCell::replace` and `RefCell::swap`

Tracking issue: #43570
2017-08-14 17:05:02 +00:00
Michael Howell
846d373ddf Clarify the language around RefCell::swap 2017-08-08 09:53:51 -07:00
Michael Howell
dc76247a0a Change "Example" to "Examples" in the doc comments 2017-08-02 10:58:27 -07:00
Michael Howell
03acea646c Implement RefCell::replace and RefCell::swap 2017-07-31 21:19:09 +00:00
Tymoteusz Jankowski
d429a4eac8 s/immutable/my_struct 2017-07-24 23:43:34 +02:00
Tymoteusz Jankowski
beb072a893 empty lines 2017-07-24 21:45:21 +02:00
Tymoteusz Jankowski
8286075346 ci fix? 2017-07-24 18:07:51 +02:00
Tymoteusz Jankowski
3c535952bc review fixes 2017-07-24 18:01:50 +02:00
Tymoteusz Jankowski
bb65d32568 add prose 2017-07-24 16:23:26 +02:00
Tymoteusz Jankowski
236b7487d5 Add simple docs example for struct Cell 2017-07-23 14:28:29 +02:00
Oliver Middleton
f2566bbaeb Correct some stability attributes
These show up in rustdoc so need to be correct.
2017-07-10 02:07:29 +01:00
Chris MacNaughton
14df54989a Ensure Guard types impl Display & Debug
Fixes #24372
2017-06-22 16:54:32 +02:00
Tshepang Lekhonkhobe
c288864ed0 doc: a more complete explanation, and a better example 2017-06-08 22:52:54 +02:00
Oliver Middleton
2f703e4304 Correct some stability versions
These were found by running tidy on stable versions of rust and finding
features stabilised with the wrong version numbers.
2017-05-20 08:38:39 +01:00
Alexis Beingessner
4ff583b116 fallout from NonZero/Unique/Shared changes 2017-05-04 23:54:54 -04:00
Guillaume Gomez
3ad844cfe2 Add more explanation on RefCell::get_mut 2017-04-24 15:08:39 +02:00
Josh Stone
313aab8fbe Remove RefCell::borrow_state
[unstable, deprecated since 1.15.0]
2017-04-20 21:16:31 -07:00
Josh Stone
cc605c895e Remove {Cell,RefCell}::as_unsafe_cell
[unstable, deprecated since 1.12.0]
2017-04-20 21:16:31 -07:00
Aaron Turon
33a5665988 Stabilize move_cell feature, closes #39264 2017-03-17 13:28:37 -07:00
Corey Farwell
3f95303db6 Rollup merge of #39793 - RalfJung:cell, r=alexcrichton
Allow more Cell methods for non-Copy types

Clearly, `get_mut` is safe for any `T`. The other two only provide unsafe pointers anyway.

The only remaining inherent method with `Copy` bound is `get`, which sounds about right to me.

I found the order if `impl` blocks in the file a little weird (first inherent impl, then some trait impls, then another inherent impl), but didn't change it to keep the diff small.

Contributes to #39264
2017-02-15 23:48:13 -05:00
Ralf Jung
044ed10fee Remove Copy bound from some Cell trait impls
Contributes to #39264
2017-02-14 09:46:06 +01:00
Ralf Jung
51a2e2fd82 Allow more Cell methods for non-Copy types
Contributes to #39264
2017-02-13 19:50:54 +01:00
Charlie Fan
a5e8bbf32b Add swap method for Cell 2017-02-11 13:08:13 +08:00
Wesley Wiser
daa509109f Update cell docs 2017-02-01 22:51:52 -05:00
Wesley Wiser
afac3ecacc Move stability attributes per feedback 2017-01-26 21:28:22 -05:00
Wesley Wiser
c6cfa3c489 Extend Cell to work with non-Copy types
Part of #39264
2017-01-24 22:48:38 -05:00