Rollup of 8 pull requests
Successful merges:
- #105791 (docs: add long error explanation for error E0472)
- #105897 (Fix an opaque type ICE)
- #105904 (Fix arch flag on i686-apple-darwin)
- #105949 (Bump `cfg-if` to `1.0` in rustc crates)
- #105964 (rustdoc: prevent CSS layout of line numbers shrinking into nothing)
- #105972 (rustdoc: simplify section anchor CSS)
- #105973 (Avoid going through the happy path in case of non-fn builtin calls)
- #105976 (Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
The no_lint_suggestion routine passes a vector of lint group names
to find_best_match_for_name. That routine depends on the sort
order of its input vector, which matters in case multiple inputs
are at the same Levenshtein distance to the target name.
However, no_lint_suggestion currently just passes lint_groups.keys()
as input vector - this is sorted in hash value order, which is not
guaranteed to be stable, and in fact differs between big- and
little-endian host platforms, causing test failures on s390x.
To fix this, always sort the lint groups before using their names
as input to find_best_match_for_name. In addition, deprecated
lint groups should never be suggested, so filter those out.
Fixes https://github.com/rust-lang/rust/issues/105379
Implement `From<bool>` for f32, f64
As is required for trait implementations, these are insta-stable. Given there is a release tomorrow and this needs FCP, I set 1.65 as the stable version.
`@rustbot` label +A-floating-point +C-feature-request +needs-fcp +relnotes +S-waiting-on-review +T-libs-api -T-libs
LLVM does this itself since 606cb8548a1b7763e0c8489c5efe66803a7ede72,
and 14 is no longer the correct standard when building lld 16,
causing build failures.
This patch does the following:
- Refactor some repeated lines into a single one
- Split the `ungated_async_fn_caller` lint into multiple lines, and make
one of those lines only print out on nightly
- Use test revisions instead of copying an existing test
This patch fixes a regression, in which `#[track_caller]`, which was
previously a no-op, was changed to actually turn on the behavior. This
should instead only happen behind the `closure_track_caller` feature
gate.
Also, add a warning for the user to understand how their code will
compile depending on the feature gate being turned on or not.
Fixes#104588
Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule
It's not used anywhere in CI, and it seems of questionable use. It was first added in 0e272de69f, which looks like it's just intended for CI, not as a user-facing feature.
Avoid going through the happy path in case of non-fn builtin calls
No functional change, just doing an early return. The removed comment is not applicable anymore, not every node needs type bindings in the error case. At best this would have been needed to avoid ICEs, but afaict this can't happen anymore today, as we do fallible checks.
Bump `cfg-if` to `1.0` in rustc crates
When `packed_simd_2` and `getrandom` are updated to newer versions, we will no longer have a dependency on old `cfg_if` versions.
Fix an opaque type ICE
fixes#104551
The issue is that if you have
```rust
type T = impl Sized;
let (_a, _b): T = ..
```
we have only the type annotation `T`, but want to use that ascription for `_a` and `_b`, so what we generate is a type ascription plus a field projection saying `_a`'s type is `T::0`. Of course `T` has no fields. Of course we could also not generate type annotations for projections into opaque types at all, but that's more fragile, as we now have to make sure that 12bbdbdb44/compiler/rustc_mir_build/src/build/matches/mod.rs (L709) doesn't have any arm that introduces a user type annotation except for `PatKind::Binding`.
docs: add long error explanation for error E0472
Add long-form error docs for E0472: "inline assembly not supported on this target" and update UI tests.
R? `@GuillaumeGomez`
It's not used anywhere in CI, and it seems of questionable use.
It was first added in 0e272de69f, which looks like it's just intended for CI, not as a user-facing feature.