| Age | Commit message (Collapse) | Author | Lines |
|
|
|
run rustfmt on libcollectionstest
|
|
|
|
Motivation: the `selectors` crate is generic over a string type,
in order to support all of `String`, `string_cache::Atom`, and
`gecko_string_cache::Atom`. Multiple trait bounds are used
for the various operations done with these strings.
One of these operations is creating a string (as efficiently as possible,
re-using an existing memory allocation if possible) from `Cow<str>`.
The `std::convert::From` trait seems natural for this, but
the relevant implementation was missing before this PR.
To work around this I’ve added a `FromCowStr` trait in `selectors`,
but with trait coherence that means one of `selectors` or `string_cache`
needs to depend on the other to implement this trait.
Using a trait from `std` would solve this.
The `Vec<T>` implementation is just added for consistency.
I also tried a more general
`impl<'a, O, B: ?Sized + ToOwned<Owned=O>> From<Cow<'a, B>> for O`,
but (the compiler thinks?) it conflicts with `From<T> for T` the impl
(after moving all of `collections::borrow` into `core::borrow`
to work around trait coherence).
|
|
Lint against lowercase static mut
Closes #37145.
Lint for non mut statics was added in https://github.com/rust-lang/rust/pull/7523, and it explicitly did not cover mut statics. I am not sure why.
|
|
|
|
|
|
|
|
Rollup of 23 pull requests
- Successful merges: #34370, #35415, #35595, #35610, #35613, #35614, #35621, #35660, #35663, #35670, #35671, #35672, #35681, #35686, #35690, #35695, #35707, #35708, #35713, #35722, #35725, #35726, #35731
- Failed merges: #35395
|
|
Closes #35721
|
|
Display all the remaining items of the iterator, similar to the `Debug`
implementation for `core::slice::Iter`:
https://github.com/rust-lang/rust/blob/f0bab98695f0a4877daabad9a5b0ba3e66121392/src/libcore/slice.rs#L930-L937
Using the `as_slice` method that was added in:
https://github.com/rust-lang/rust/pull/35447
|
|
|
|
Similar to the `as_slice` method on `core::slice::Iter` struct.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Help cleans up our build a bit and stays in line with the rest of our crates
denying warnings traditionally.
|
|
This commit removes all unstable and deprecated functions in the standard
library. A release was recently cut (1.3) which makes this a good time for some
spring cleaning of the deprecated functions.
|
|
|
|
|
|
|
|
Closes #25976.
|
|
|
|
|
|
|
|
Old `.drain()` on vec is performed using `.drain(..)` now.
`.drain(range)` is unstable and under feature(collections_drain)
[breaking-change]
|
|
|