Rollup of 6 pull requests
Successful merges:
- #109724 (prioritize param env candidates if they don't guide type inference)
- #110021 (Fix a couple ICEs in the new `CastKind::Transmute` code)
- #110044 (Avoid some manual slice length calculation)
- #110115 (compiletest: Use remap-path-prefix only in CI)
- #110121 (Fix `x check --stage 1` when download-rustc is enabled)
- #110124 (Some clippy fixes in the compiler)
Failed merges:
- #109752 (Stall auto trait assembly in new solver for int/float vars)
r? `@ghost`
`@rustbot` modify labels: rollup
compiletest: Use remap-path-prefix only in CI
This makes jump-to-definition work in most IDEs, as well as being easier to understand for contributors.
Fixes https://github.com/rust-lang/rust/issues/109725. cc `@TimNN`
Fix a couple ICEs in the new `CastKind::Transmute` code
Check the sizes of the immediates, rather than the overall types, when deciding whether we can convert types without going through memory.
Fixes#110005Fixes#109992Fixes#110032
cc `@matthiaskrgr`
prioritize param env candidates if they don't guide type inference
intended to supersede #109579. We disable the prioritization during coherence to maintain completeness.
Long term we can hopefully replace this hack with adding OR to external constraints at which point the only relevant part when merging responses is whether they guide type inference in the same way.
Reuses `try_merge_responses` for assembly and the cleanest way to impl that was to actually split that so that `try_merge_responses` returns `None` if we fail to merge them and then add `flounder` which is used afterwards which is allowed to lower the certainty of our responses.
If, in the future, we add the ability to merge candidates `YES: ?0 = Vec<u32>` and `YES: ?0 = Vec<i32>` to `AMBIG: ?0 = Vec<?1>`, this should happen in `flounder`.
r? `@compiler-errors` `@BoxyUwU`
Fix macOS and Windows installers when rust-docs is not available.
This fixes the macOS `.pkg` and Windows `.msi` installers to work when rust-docs is not available. If the rust-docs component is not built, then the installer would fail. This adds the rust-docs component to the filtering mechanism so that the rust-docs line of the distribution definition aren't included.
I tested installing and uninstalling both with and without the rust-docs component available.
This happens on the aarch64-apple-darwin distribution provided by rust-lang since we currently disable the rust-docs component due to long build times. An alternate solution would be to just enable the rust-docs component on aarch64-apple-darwin since there are faster build systems.
Fixes#109877
Migrate remainder of rustc_ty_utils to `SessionDiagnostic`
This moves the remaining errors in `rust_ty_utils` to `SessionsDiagnostic`.
r? ``@davidtwco``
Instantiate instead of erasing binder when probing param methods
Fixes#108836
There is a really old comment saying that a `WhereClauseCandidate` probe candidate "should not contain any inference variables", but I'm not really confident that that comment applies anymore. In contrast, other candidates that we assemble during method probe contain inference variables in their substitutions (e.g. `InherentImplCandidate`)...
Since this change is made only to support a nightly feature, I'm happy to gate the new behavior behind this feature flag or discuss it further.
r? types
The shadowing lead to an incorrect comparison. Rename it and compare it
properly. compiler-errors told me that I should just include the fix
here without a test.