summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2016-02-29std: Stabilize APIs for the 1.8 releaseAlex Crichton-67/+44
This commit is the result of the FCPs ending for the 1.8 release cycle for both the libs and the lang suteams. The full list of changes are: Stabilized * `braced_empty_structs` * `augmented_assignments` * `str::encode_utf16` - renamed from `utf16_units` * `str::EncodeUtf16` - renamed from `Utf16Units` * `Ref::map` * `RefMut::map` * `ptr::drop_in_place` * `time::Instant` * `time::SystemTime` * `{Instant,SystemTime}::now` * `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier` * `{Instant,SystemTime}::elapsed` * Various `Add`/`Sub` impls for `Time` and `SystemTime` * `SystemTimeError` * `SystemTimeError::duration` * Various impls for `SystemTimeError` * `UNIX_EPOCH` * `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign` Deprecated * Scoped TLS (the `scoped_thread_local!` macro) * `Ref::filter_map` * `RefMut::filter_map` * `RwLockReadGuard::map` * `RwLockWriteGuard::map` * `Condvar::wait_timeout_with` Closes #27714 Closes #27715 Closes #27746 Closes #27748 Closes #27908 Closes #29866
2016-02-27Auto merge of #31942 - bluss:iter-desugar, r=steveklabnikbors-1/+1
Make for loop desugaring for iterators more precise The UFCS call IntoIterator::into_iter() is used by the for loop.
2016-02-27Make for loop desugaring for iterators more preciseUlrik Sverdrup-1/+1
The UFCS call IntoIterator::into_iter() is used by the for loop.
2016-02-26Use .copy_from_slice() where applicableUlrik Sverdrup-2/+2
.copy_from_slice() does the same job of .clone_from_slice(), but the former is explicitly for Copy elements and calls `memcpy` directly, and thus is it efficient without optimization too.
2016-02-26Auto merge of #31834 - ubsan:copy_from_slice, r=alexcrichtonbors-1/+13
implements rust-lang/rfcs#1419 r? alexcrichton
2016-02-25Add unstable copy_from_sliceNicholas Mazzuca-1/+13
2016-02-24Auto merge of #31778 - aturon:snapshot, r=alexcrichtonbors-6/+3
r? @alexcrichton
2016-02-23Register new snapshotsAaron Turon-6/+3
2016-02-22Auto merge of #30969 - Amanieu:extended_atomic_cmpxchg, r=alexcrichtonbors-9/+453
This is an implementation of rust-lang/rfcs#1443.
2016-02-22Correct Iterator trait documentationMichael Huynh-7/+7
Fixes several minor spelling errors and includes a suggested style fix.
2016-02-21Auto merge of #31761 - Amanieu:volatile, r=alexcrichtonbors-0/+48
Tracking issue: #31756 RFC: rust-lang/rfcs#1467 I've made these unstable for now. Should they be stabilized straight away since we've had plenty of experience with people using the unstable intrinsics?
2016-02-19Auto merge of #31736 - bluss:write-char, r=alexcrichtonbors-0/+4
fmt: Make sure write_fmt's implementation can use write_char It looks like the Adapter inside write_fmt was never updated to forward the write_char method.
2016-02-18Add compare_exchange and compare_exchange_weak to atomic typesAmanieu d'Antras-9/+426
2016-02-18Implement read_volatile and write_volatileAmanieu d'Antras-0/+48
2016-02-18Add intrinsics for compare_exchange and compare_exchange_weakAmanieu d'Antras-0/+27
2016-02-17fmt: Make sure write_fmt's implementation can use write_charUlrik Sverdrup-0/+4
It looks like the Adapter inside write_fmt was never updated to forward the write_char method.
2016-02-16Improve 'std::mem::transmute_copy' doc example.Corey Farwell-2/+18
Prior to this commit, it was a trivial example that did not demonstrate the effects of using the function. Fixes https://github.com/rust-lang/rust/issues/31094
2016-02-15Auto merge of #31663 - nodakai:cleanup-uint_module, r=alexcrichtonbors-7/+7
2016-02-15libcore/num: Remove unused macro argument.NODA, Kai-7/+7
It is no longer necessary after dd0d495f50e2d8ba501e6b003cb4c1ef52d95ed5 Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-02-14Rollup merge of #31655 - ollie27:patch-4, r=steveklabnikSteve Klabnik-5/+5
r? @steveklabnik
2016-02-14Rollup merge of #31607 - steveklabnik:gh31599, r=brsonSteve Klabnik-2/+1
Fixes #31599
2016-02-14Fix a couple of issues in from_utf8 docsOliver Middleton-3/+3
2016-02-14Fix doc error for Utf8ErrorOliver Middleton-1/+1
2016-02-14Fix signed int checked_neg docsOliver Middleton-1/+1
2016-02-14Remove incorrect documentationSteve Klabnik-2/+1
Fixes #31599
2016-02-14Rollup merge of #31535 - ↵Manish Goregaokar-0/+14
Ketsuban:more-detail-in-wrapping-shift-documentation, r=steveklabnik `wrapping_shl` and `wrapping_shr` are easy to mistake for rotations, when in fact they work somewhat differently. The documentation currently available is a little sparse and easy to misinterpret, so I've added a warning to anyone who bumps into them that the equivalent rotate methods may actually be what they're looking for. If it's deemed useful to add a symmetrical mention to the documentation for the `rotate_left` and `rotate_right` methods, I can certainly have a go at that, but my gut feeling is that people likely to want a rotate will already know about the wrapping-arithmetic methods, for example from writing CPU simulators.
2016-02-11bootstrap: Add a bunch of Cargo.toml filesAlex Crichton-0/+9
These describe the structure of all our crate dependencies.
2016-02-11Auto merge of #31479 - kamalmarhubi:fmt-pointer-unsized, r=alexcrichtonbors-5/+5
This allows printing pointers to unsized types with the {:p} formatting directive. The following impls are extended to unsized types: - impl<'a, T: ?Sized> Pointer for &'a T - impl<'a, T: ?Sized> Pointer for &'a mut T - impl<T: ?Sized> Pointer for *const T - impl<T: ?Sized> Pointer for *mut T - impl<T: ?Sized> fmt::Pointer for Box<T> - impl<T: ?Sized> fmt::Pointer for Rc<T> - impl<T: ?Sized> fmt::Pointer for Arc<T>
2016-02-10Note rotate_{left,right} in wrapping_sh{lr} docsThomas Winwood-0/+14
2016-02-09Rollup merge of #31520 - steveklabnik:doc_num, r=alexcrichtonSteve Klabnik-1/+19
This commit does two things: * Re-works the module-level documentation. * Cleaning up wording and adding links to where error types are used. Part of #29364
2016-02-09Rollup merge of #31516 - steveklabnik:doc_tuples, r=brsonSteve Klabnik-18/+1
Fixes #29339
2016-02-09Rollup merge of #31514 - cgar:spelling, r=alexcrichtonSteve Klabnik-2/+2
2016-02-09Properly document tuplesSteve Klabnik-18/+1
Fixes #29339
2016-02-09Some docs for std::numSteve Klabnik-1/+19
This commit does two things: * Re-works the module-level documentation. * Cleaning up wording and adding links to where error types are used. Part of #29364
2016-02-09Minor spelling fixesCarlos E. Garcia-2/+2
2016-02-09Auto merge of #31510 - dikaiosune:master, r=blussbors-4/+4
Since a lexicographic ordering of a struct could vary based on which struct members are compared first, I ended up doing some testing to ensure that the behavior when deriving these traits was what I expected (ordered based on the top to bottom order of declaration of the members). I wanted to add this little bit of documentation to potentially save someone else the same effort. That is, assuming that my testing correctly reflects the intended behavior of the compiler. r? @steveklabnik
2016-02-09Clarifying behavior of #[derive(Ord, PartialOrd)] in doc comments.Adam Perry-4/+4
Removing redundant statement about lexicographic ordering.
2016-02-08Implement fmt::Pointer for pointers to unsized typesKamal Marhubi-5/+5
This allows printing pointers to unsized types with the {:p} formatting directive. The following impls are extended to unsized types: - impl<'a, T: ?Sized> Pointer for &'a T - impl<'a, T: ?Sized> Pointer for &'a mut T - impl<T: ?Sized> Pointer for *const T - impl<T: ?Sized> Pointer for *mut T - impl<T: ?Sized> fmt::Pointer for Box<T> - impl<T: ?Sized> fmt::Pointer for Rc<T> - impl<T: ?Sized> fmt::Pointer for Arc<T>
2016-02-08Remove old #[allow(trivial_casts)] annotationsAlex Crichton-8/+0
These were added a long time ago but we long since switched the lint back to allow-by-default, so these annotations shouldn't be necessary.
2016-02-07Auto merge of #31450 - bluss:no-null-markers, r=Gankrobors-2/+10
Document that Unique<T> and Shared<T> are non-null
2016-02-06Document that Unique<T> and Shared<T> are non-nullUlrik Sverdrup-2/+10
2016-02-06Auto merge of #31410 - rkruppe:issue31109, r=pnkfelixbors-10/+30
Issue #31109 uncovered two semi-related problems: * A panic in `str::parse::<f64>` * A panic in `rustc::middle::const_eval::lit_to_const` where the result of float parsing was unwrapped. This series of commits fixes both issues and also drive-by-fixes some things I noticed while tracking down the parsing panic.
2016-02-04drive-by doc fixesRobin Kruppe-1/+1
2016-02-04Prevent the immediate panic uncovered by #31109 and add a test.Robin Kruppe-8/+28
The code there still triggers an ICE, but for different reasons (const eval unwraps the parse result).
2016-02-04Use the right target ratio in Algorithm M quickstart.Robin Kruppe-1/+1
Using f64's bit size probably wasn't actually *wrong*, but it would overshoot for no reason. This might have slowed down f32 parsing significantly.
2016-02-03Rollup merge of #31351 - steveklabnik:gh31318, r=alexcrichtonManish Goregaokar-0/+24
This is a behavior that some find confusing, so it deserves its own example. Fixes #31318 I think this wording might be a bit strange, but I couldn't come up with anything better. Feedback very welcome.
2016-02-03Rollup merge of #31220 - steveklabnik:gh30632, r=nikomatsakisManish Goregaokar-0/+43
Fixes #30632 I'm not sure if this explanation is good enough. If it is, I will add it to filter as well.
2016-02-02Rollup merge of #31346 - alopatindev:fixes, r=aturonSteve Klabnik-1/+1
Space character is missed after `let some_usize`
2016-02-02Rollup merge of #31345 - kamalmarhubi:book-docs-special-section-errors, ↵Steve Klabnik-1/+1
r=steveklabnik This matches the usage in the standard library's documentation.
2016-02-02Rollup merge of #31247 - tshepang:redundant-bindings, r=steveklabnikSteve Klabnik-28/+10