Also cache the stable hash of interned Predicates
continuation of https://github.com/rust-lang/rust/pull/94299
This is a small perf improvement and shares more code between `Ty` and `Predicate`
Rollup of 10 pull requests
Successful merges:
- #104465 (Document more settings for building rustc for Fuchsia)
- #104951 (Simplify checking for `GeneratorKind::Async`)
- #104959 (Revert #104269 (to avoid spurious hang/test failure in CI))
- #104978 (notify the rust-analyzer team on changes to the rust-analyzer subtree)
- #105010 (Fix documentation of asymptotic complexity for rustc_data_structures::SortedMap)
- #105016 (Add sentence when rustdoc search is running)
- #105020 (rustdoc: merge background-image rules in rustdoc-toggle CSS)
- #105024 (rustdoc: remove `fnname` CSS class that's styled exactly like `fn`)
- #105027 (Rustdoc-Json: Add tests for linking to foreign variants.)
- #105038 (Clean up pr 104954)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Clean up pr 104954
UI test filename typo fix and a simple comment rewording. Thanks.
CC `@vincenzopalazzo` (you spelled your name wrongly in the FIXME)
r? `@estebank`
Rustdoc-Json: Add tests for linking to foreign variants.
I initially taught these would be bugs, but it turn out they work perfectly, and the variant is added to paths.
Most of the work is done by jsondoclint checking all the ID's resolve (although this wont happen for links until #105015, which in turn is blocked on removing foreign traits), but we do check that neither the enum nor the variant is inlined, so it must be resolved correctly through paths.
r? ``@GuillaumeGomez``
rustdoc: remove `fnname` CSS class that's styled exactly like `fn`
It's not obvious why this was ever a separate class name, since even in c4219a4783 when it was first added, it was styled identically to regular `fn` links.
Revert #104269 (to avoid spurious hang/test failure in CI)
Causes hangs/memory overflows in the test suite apparently 😢Reopens#104225Fixes#104957
r? ``@lcnr``
Document more settings for building rustc for Fuchsia
This documents that you need to link for Fuchsia with `lld` and provides configuration settings for both `clang` and `lld`. It also adjusts the documentation for running the test suite to recommend installing to a prefix.
r? ``@tmandry``
test-various: Add tests for {i686,aarch64}-unknown-uefi
This extends the existing test for x86_64-unknown-uefi to test the other two UEFI targets as well.
Assign myself for docs updates
This sets myself as the reviewer for docs submodule updates. Now with https://github.com/rust-lang/triagebot/pull/1673 automating the process, this piece of the puzzle handles the assignment step.
Rollup of 9 pull requests
Successful merges:
- #104804 (Rename `ast::Lit` as `ast::MetaItemLit`.)
- #104891 (Add documentation for `has_escaping_bound_vars`)
- #104933 (interpret: remove PartialOrd from a bunch of types that do not have or need a sensible order)
- #104936 (Ignore bivariant parameters in test_type_match.)
- #104954 (make simple check of prinf function)
- #104956 (Avoid ICE if the Clone trait is not found while building error suggestions)
- #104982 (interpret: get rid of run() function)
- #104998 (Update my mailmap)
- #105006 (stricter alignment enforcement for ScalarPair)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
It's not obvious why this was ever a separate class name, since even
in c4219a4783 when it was first added,
it was styled identically to regular `fn` links.
`mk_const(ty::ConstKind::X(...), ty)` can now be simplified to
`mk_cosnt(..., ty)`.
I searched with the following regex: \mk_const\([\n\s]*(ty::)?ConstKind\
I've left `ty::ConstKind::{Bound, Error}` as-is, they seem clearer this
way.
- Accept `impl Into`
- Implement `From<>` for `ConstKind`
Note: this adds a dependency on `derive_more` (MIT license). It allows
to derive a lot of traits (like `From` here) that would be otherwise
tedious to implement.
stricter alignment enforcement for ScalarPair
`@eddyb` [indicated](https://github.com/rust-lang/rust/pull/103926#discussion_r1033315005) that alignment violating this check might be a bug. So let's see what the test suite says.
(Only the 2nd commit actually changes behavior... but I couldn't not do that other cleanup.^^)
Does the PR CI runner even enable debug assertions though...?
make simple check of prinf function
Fixes https://github.com/rust-lang/rust/issues/92898
With this commit we start to make some simple
check when the name resolution fails, and
we generate some helper messages in case the
name is a C name like in the case of the `printf`
and suggest the correct rust method.
`@rustbot` r? `@pnkfelix`
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Ignore bivariant parameters in test_type_match.
https://github.com/rust-lang/rust/pull/103491 made opaque types bivariant with respect of some of their lifetime parameters. Because of this bivariance, some lifetime variables were not unified to anything during borrowck, and were considered as unequal by borrowck type test.
This PR makes type test ignore the bivariant parameters in test_type_match.
Fixes https://github.com/rust-lang/rust/issues/104815
r? `@oli-obk`
Add documentation for `has_escaping_bound_vars`
Thanks to `@BoxyUwU` for explaining this to me. Adding docs with a helpful link if people get confused.
Update VecDeque implementation to use head+len instead of head+tail
(See #99805)
This changes `alloc::collections::VecDeque`'s internal representation from using head and tail indices to using a head index and a length field. It has a few advantages over the current design:
* It allows the buffer to be of length 0, which means the `VecDeque::new` new longer has to allocate and could be changed to a `const fn`
* It allows the `VecDeque` to fill the buffer completely, unlike the old implementation, which always had to leave a free space
* It removes the restriction for the size to be a power of two, allowing it to properly `shrink_to_fit`, unlike the old `VecDeque`
* The above points also combine to allow the `Vec<T> -> VecDeque<T>` conversion to be very cheap and guaranteed O(1). I mention this in the `From<Vec<T>>` impl, but it's not a strong guarantee just yet, as that would likely need some form of API change proposal.
All the tests seem to pass for the new `VecDeque`, with some slight adjustments.
r? `@scottmcm`
Remove `SelectionContext::infcx()` in favor of field access
Encapsulation doesn't seem particularly important here, and having two choices is always more confusing than having one.
r? types
Change multiline span ASCII art visual order
Tweak the ASCII art for nested multiline spans so that we minimize line overlaps.
Partially addresses https://github.com/rust-lang/rust/issues/61017.