Use min_specialization in libcore
Getting `TrustedRandomAccess` to work is the main interesting thing here.
- `get_unchecked` is now an unstable, hidden method on `Iterator`
- The contract for `TrustedRandomAccess` is made clearer in documentation
- Fixed a bug where `Debug` would create aliasing references when using the specialized zip impl
- Added tests for the side effects of `next_back` and `nth`.
closes#68536
Don't immediately error for cycles during normalization
#73452 meant some normalization cycles could be detected earlier, breaking some code.
This PR makes defers errors for normalization cycles to fulfillment, fixing said code.
Fixes#74868
r? @nikomatsakis
Rollup of 8 pull requests
Successful merges:
- #75672 (Move to intra-doc links for task.rs and vec.rs)
- #75702 (Clean up E0759 explanation)
- #75703 (Enable stack-overflow detection on musl for non-main threads)
- #75710 (Fix bad printing of const-eval queries)
- #75716 (Upgrade Emscripten on CI to 1.39.20 )
- #75731 (Suppress ty::Float in MIR comments of ty::Const)
- #75733 (Remove duplicated alloc vec bench push_all_move)
- #75743 (Rename rustc_lexer::TokenKind::Not to Bang)
Failed merges:
r? @ghost
Rename rustc_lexer::TokenKind::Not to Bang
All other tokens are named by the punctuation they use, rather than
by semantics operation they stand for. `!` is the only exception to
the rule, let's fix it.
Upgrade Emscripten on CI to 1.39.20
This Emscripten version was the first to be cut after the LLVM 11
release branch was created, so it should be the most compatible with
LLVM 11. The old version we were using was incompatible with LLVM 11
because its wasm-ld did not understand all the relocations that LLVM
11 emits.
Move to intra-doc links for task.rs and vec.rs
Partial fix for #75080
links for [`get`], [`get_mut`] skipped due to #75643
link for [`copy_from_slice`] skipped due to #63351
All other tokens are named by the punctuation they use, rather than
by semantics operation they stand for. `!` is the only exception to
the rule, let's fix it.
Add a packed/tagged pointer abstraction and utilize it for ParamEnv
The intent here is mostly just to add the abstraction; I suspect that there are definitely more use cases for it, and we can explore those over time now that there's a (mostly) safe abstraction that can be used in rustc.
This Emscripten version was the first to be cut after the LLVM 11
release branch was created, so it should be the most compatible with
LLVM 11. The old version we were using was incompatible with LLVM 11
because its wasm-ld did not understand all the relocations that LLVM
11 emits.
Rollup of 7 pull requests
Successful merges:
- #75069 (move const param structural match checks to wfcheck)
- #75587 (mir building: fix some comments)
- #75593 (Adjust installation place for compiler docs)
- #75648 (Make OnceCell<T> transparent to dropck)
- #75649 (Fix intra-doc links for inherent impls that are both lang items and not the default impl)
- #75674 (Move to intra doc links for std::io)
- #75696 (Remove `#[cfg(miri)]` from OnceCell tests)
Failed merges:
r? @ghost
Remove `#[cfg(miri)]` from OnceCell tests
They were carried over from once_cell crate, but they are not entirely
correct (as miri now supports more things), and we don't run miri
tests for std, so let's just remove them.
Maybe one day we'll run miri in std, but then we can just re-install
these attributes.
Move to intra doc links for std::io
Helps with #75080.
@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
r? @jyn514
I had no problems with those files so I added some small links here and there.
Fix intra-doc links for inherent impls that are both lang items and not the default impl
I found in https://github.com/rust-lang/rust/pull/75464#issuecomment-675125984 that `str::to_uppercase()` doesn't resolve while `str::trim()` does. The only real difference is that `to_uppercase` is defined in `alloc`, while trim is defined in `core`. It turns out that rustdoc was ignoring `lang_items.str_alloc_impl()` - it saw them in `collect_trait_impls`, but not for intra-doc links.
This uses the same `impls` for all parts of rustdoc, so that there can be no more inconsistency. It does have the slight downside that the matches are no longer exhaustive but it will be very clear if a new lang item is missed because it will panic when you try to document it (and if you don't document it, does rustdoc really need to know about it?).
~~This needs a test case (probably just `str::to_uppercase`).~~ Added.
This is best reviewed commit-by-commit.
r? @GuillaumeGomez
Adjust installation place for compiler docs
This avoids conflicts when installing with rustup; rustup does not currently
support overlapping installations.
r? @matthiaskrgr
move const param structural match checks to wfcheck
fixes#75047fixes#74950
We currently check for structural match violations inside of `type_of`.
As we need to check the array length when checking if `[NonEq; arr_len]` is structural match, we potentially require the variance of an expression. Computing the variance requires `type_of` for all types though, resulting in a cycle error.
r? @varkor @eddyb
Doc alias checks: ensure only items appearing in search index can use it
Following the discussion in #73721, I added checks to ensure that only items appearing in the search are allowed to have doc alias.
r? @ollie27