Resolve inconsistency in error messages between "parameter" and "variable".
The inconsistency was introduced in 104fe1c4db (#33619), when a label saying `type variable` was added to an error with a message talking about `type parameters`.
Given that `parameter` is far more prevalent when referring to generics in the context of Rust, IMO it should be that in both the message and the label.
r? @nikomatsakis or @estebank
Remove collection-specific `with_capacity` documentation from `std::collections`
Fixes#59931
The style of `std::collections` module doc is very much a beginner friendly guide, and documenting niche, collection-specific behaviour feels out of place, if not brittle.
The note about `VecDeque` is outdated (see issue), and while `Vec` probably won't change its guarantees any time soon, the users who are interested in its allocation properties will find that in its own documentation.
Add test checking that Index<T: ?Sized> works
I've noticed that we have an `Idx: ?Sized` bound on the **index** in the `Index`, which seems strange given that we accept index by value. My guess is that it was meant to be removed in https://github.com/rust-lang/rust/pull/23601, but was overlooked.
If I remove this bound, `./x.py src/libstd/ src/libcore/` passes, which means at least that this is not covered by test.
I think there's three things we can do here:
* run crater with the bound removed to check if there are any regressions, and merge this, to be consistent with other operator traits
* run crater, get regressions, write a test for this with a note that "hey, we tried to fix it, its unfixable"
* decide, in the light of by-value DSTs, that this is a feature rather than a bug, and add a test
cc @rust-lang/libs
EDIT: the forth alternative is that there exist a genuine reason why this is the case, but I failed to see it :D
Rollup of 5 pull requests
Successful merges:
- #59128 (Emit ansi color codes in the `rendered` field of json diagnostics)
- #59646 (const fn: Improve wording)
- #59986 (Miri: refactor new allocation tagging)
- #60003 (LLD is not supported on Darwin)
- #60018 (Miri now supports entropy, but is still slow)
Failed merges:
r? @ghost
Miri: refactor new allocation tagging
Tagging and initializing `AllocExtra` now go hand-in-hand so one cannot forget to do one when doing the other. In particular, `memory.allocate` is now much easier to use correctly (because it will already return a tagged pointer).
r? @oli-obk
Previously there wasn't any documentation to show what the type of
`Item` was inside `std::env::SplitPaths`. Now, in the same format as
other examples of docs in `srd` for `Iterator#Item`, we mention the
type.
This fixes#59543.