| Age | Commit message (Collapse) | Author | Lines |
|
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
|
|
Make for loop desugaring for iterators more precise
The UFCS call IntoIterator::into_iter() is used by the for loop.
|
|
The UFCS call IntoIterator::into_iter() is used by the for loop.
|
|
.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.
|
|
implements rust-lang/rfcs#1419
r? alexcrichton
|
|
|
|
r? @alexcrichton
|
|
|
|
This is an implementation of rust-lang/rfcs#1443.
|
|
Fixes several minor spelling errors and includes a suggested style fix.
|
|
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?
|
|
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.
|
|
|
|
|
|
|
|
It looks like the Adapter inside write_fmt was never updated to forward
the write_char method.
|
|
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
|
|
|
|
It is no longer necessary after dd0d495f50e2d8ba501e6b003cb4c1ef52d95ed5
Signed-off-by: NODA, Kai <nodakai@gmail.com>
|
|
r? @steveklabnik
|
|
Fixes #31599
|
|
|
|
|
|
|
|
Fixes #31599
|
|
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.
|
|
These describe the structure of all our crate dependencies.
|
|
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>
|
|
|
|
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
|
|
Fixes #29339
|
|
|
|
Fixes #29339
|
|
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
|
|
|
|
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
|
|
Removing redundant statement about lexicographic ordering.
|
|
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>
|
|
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.
|
|
Document that Unique<T> and Shared<T> are non-null
|
|
|
|
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.
|
|
|
|
The code there still triggers an ICE, but for different reasons (const eval unwraps the parse result).
|
|
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.
|
|
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.
|
|
Fixes #30632
I'm not sure if this explanation is good enough. If it is, I will add it to filter as well.
|
|
Space character is missed after `let some_usize`
|
|
r=steveklabnik
This matches the usage in the standard library's documentation.
|
|
|