about summary refs log tree commit diff
path: root/src/libcoretest/cell.rs
AgeCommit message (Collapse)AuthorLines
2015-09-20Miscellaneous cleanup for old issues.Lee Jeffery-12/+11
2015-05-29Add map and filter_map associated functions to std::cell::Ref and RefMutSimon Sapin-0/+76
See design discussion in https://github.com/rust-lang/rust/pull/25747
2015-05-28Move std::cell::clone_ref to a clone associated function on std::cell::RefSimon Sapin-2/+2
... and generalize the bounds on the value type.
2015-05-13RebasingNick Cameron-11/+12
2015-05-02Make `UnsafeCell`, `RefCell`, `Mutex`, and `RwLock` accept DSTsP1start-0/+24
This + DST coercions (#24619) would allow code like `Rc<RefCell<Box<Trait>>>` to be simplified to `Rc<RefCell<Trait>>`.
2015-03-31std: Clean out #[deprecated] APIsAlex Crichton-8/+5
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-4/+4
Now that support has been removed, all lingering use cases are renamed.
2015-03-09Rename #[should_fail] to #[should_panic]Steven Fackler-1/+1
2015-02-10Deprecating i/u suffixes in libcoretestAlfie John-12/+12
2015-02-01std: Deprecate RefCell::{try_borrow, try_borrow_mut}Alex Crichton-0/+4
The existence of these two functions is at odds with our current [error conventions][conventions] which recommend that panicking and `Result`-like variants should not be provided together. [conventions]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md#do-not-provide-both-result-and-fail-variants This commit adds a new `borrow_state` function returning a `BorrowState` enum to `RefCell` which serves as a replacemnt for the `try_borrow` and `try_borrow_mut` functions.
2015-01-30Remove all `i` suffixesTobias Bucher-11/+11
2015-01-21Minor fixesBrian Anderson-1/+0
2015-01-08Improvements to feature stagingBrian Anderson-1/+1
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-4/+4
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2014-12-06libcoretest: remove unnecessary `as_slice()` callsJorge Aparicio-4/+4
2014-11-14impl Default for Cell and RefCellStepan Koltsov-0/+13
It is necessary to have #[deriving(Default)] for struct containing cells like Cell<u32>.
2014-10-24Add as_unsafe_cell() for Cell and RefCellKeegan McAllister-0/+19
Fixes #18131.
2014-06-29Extract tests from libcore to a separate crateSteven Fackler-0/+129
Libcore's test infrastructure is complicated by the fact that many lang items are defined in the crate. The current approach (realcore/realstd imports) is hacky and hard to work with (tests inside of core::cmp haven't been run for months!). Moving tests to a separate crate does mean that they can only test the public API of libcore, but I don't feel that that is too much of an issue. The only tests that I had to get rid of were some checking the various numeric formatters, but those are also exercised through normal format! calls in other tests.