Matthias Krüger [Thu, 22 Dec 2022 00:01:13 +0000 (01:01 +0100)]
Rollup merge of #105932 - MasterAwesome:aarch64-bti-llvm-15, r=nikic
Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15
When building with Fat LTO and BTI enabled on aarch64, the BTI is set to `Module::Min` for alloc shim but is set to `Module::Error` for the crate. This was fine when we were using LLVM-14 but LLVM-15 changes it's behaviour to support for compiling with different `mbranch-protection` flags.
bors [Wed, 21 Dec 2022 20:19:22 +0000 (20:19 +0000)]
Auto merge of #105979 - matthiaskrgr:rollup-2luw3mx, r=matthiaskrgr
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)
bors [Wed, 21 Dec 2022 14:27:57 +0000 (14:27 +0000)]
Auto merge of #100390 - jhpratt:float-from-bool, r=dtolnay
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.
Matthias Krüger [Tue, 20 Dec 2022 22:35:17 +0000 (23:35 +0100)]
Rollup merge of #105976 - jyn514:unused-make-targets, r=Mark-Simulacrum
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 0e272de69f4a9c889e5f1a024a88b3e1f60cb6c5, which looks like it's just intended for CI, not as a user-facing feature.
Matthias Krüger [Tue, 20 Dec 2022 22:35:17 +0000 (23:35 +0100)]
Rollup merge of #105973 - oli-obk:simplify_callee_checks, r=jackh726
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.
Matthias Krüger [Tue, 20 Dec 2022 22:35:15 +0000 (23:35 +0100)]
Rollup merge of #105897 - oli-obk:tait_patterns, r=TaKO8Ki
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 https://github.com/rust-lang/rust/blob/12bbdbdb440119a0b86d2ee742ec1460cdb2c5b9/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`.
It's not used anywhere in CI, and it seems of questionable use.
It was first added in 0e272de69f4a9c889e5f1a024a88b3e1f60cb6c5, which looks like it's just intended for CI, not as a user-facing feature.
bors [Tue, 20 Dec 2022 17:09:11 +0000 (17:09 +0000)]
Auto merge of #105381 - uweigand:s390x-ffi-vaarg, r=nikic
Implement va_list and va_arg for s390x FFI
Following the s390x ELF ABI and based on the clang implementation, provide appropriate definitions of va_list in library/core/src/ffi/mod.rs and va_arg handling in compiler/rustc_codegen_llvm/src/va_arg.rs.
Fixes the following test cases on s390x:
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn src/test/ui/abi/variadic-ffi.rs
bors [Tue, 20 Dec 2022 13:58:08 +0000 (13:58 +0000)]
Auto merge of #105951 - matthiaskrgr:rollup-aqxz888, r=matthiaskrgr
Rollup of 7 pull requests
Successful merges:
- #105835 (Refactor post borrowck cleanup passes)
- #105930 (Disable `NormalizeArrayLen`)
- #105938 (Update coerce_unsized tracking issue from #27732 to #18598)
- #105939 (Improve description of struct-fields GUI test)
- #105943 (Add regression test for #102206)
- #105944 (Add regression test for #80816)
- #105945 (Add regression test for #57404)
bors [Tue, 20 Dec 2022 10:20:27 +0000 (10:20 +0000)]
Auto merge of #105940 - matthiaskrgr:rollup-ho4po1t, r=matthiaskrgr
Rollup of 5 pull requests
Successful merges:
- #105901 (Don't panic on stable since miri is not available there)
- #105912 (rustdoc: force pre tags to have the default line height)
- #105914 (rustdoc: Simplify CSS for scraped code examples code blocks)
- #105933 (Add readable rustdoc display for tvOS and watchOS)
- #105935 (docs/test: add UI test and long-form error docs for `E0377`)
Arvind Mukund [Tue, 20 Dec 2022 03:06:30 +0000 (19:06 -0800)]
Correct ModFlagBehavior for Aarch64 on LLVM-15
When building with Fat LTO and BTI enabled on aarch64, the BTI is set to
`Module::Min` for alloc shim but is set to `Module::Error` for the
crate. This was fine when we were using LLVM-14 but LLVM-15 changes it's
behaviour to support for compiling with different `mbranch-protection`
flags.
bors [Tue, 20 Dec 2022 01:06:52 +0000 (01:06 +0000)]
Auto merge of #105918 - matthiaskrgr:rollup-mmazd62, r=matthiaskrgr
Rollup of 7 pull requests
Successful merges:
- #105801 (Realistic `Path::as_mut_os_str` doctest)
- #105860 (Add long error docs for `E0460` and `E0457`)
- #105895 (Test that we don't add a new kind of breaking change with TAITs)
- #105902 (docs: improve pin docs)
- #105910 (Update books)
- #105913 (rustdoc: remove width-limiter from source pages, stop overriding CSS)
- #105915 (Revert "Replace usage of `ResumeTy` in async lowering with `Context`")
bors [Mon, 19 Dec 2022 22:37:12 +0000 (22:37 +0000)]
Auto merge of #105905 - lqd:revert-103880, r=jackh726
Revert #103880 "Use non-ascribed type as field's type in mir"
This PR prepares a revert for #103880 to fix #105809, #105881, #105886 and others (like the duplicates of the first one), in case an actual fix can't get done today.
I've also added the MCVE from #105809. There is no MCVE for the #105881 and #105886 ICEs yet however, so there are no tests for them here, although we'll need one before relanding the original changes.
Were this PR to land, it would also reopen #96514 as it was fixed by the original PR.
Opening as draft to allow time for a possible fix.
Ulrich Weigand [Tue, 6 Dec 2022 16:36:09 +0000 (17:36 +0100)]
Implement va_list and va_arg for s390x FFI
Following the s390x ELF ABI and based on the clang implementation,
provide appropriate definitions of va_list in library/core/src/ffi/mod.rs
and va_arg handling in compiler/rustc_codegen_llvm/src/va_arg.rs.
Fixes the following test cases on s390x:
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn
src/test/ui/abi/variadic-ffi.rs
Matthias Krüger [Mon, 19 Dec 2022 19:55:00 +0000 (20:55 +0100)]
Rollup merge of #105915 - andrewpollack:revert-105250-async-rm-resumety, r=tmandry
Revert "Replace usage of `ResumeTy` in async lowering with `Context`"
Reverts rust-lang/rust#105250 Fixes: #105501
Following instructions from [forge](https://forge.rust-lang.org/compiler/reviews.html#reverts).
This change introduced a breaking change that is not actionable nor relevant, and is blocking updates to our toolchain. Along with other comments on the CL marking issues that are fixed by reverts, reverting is best until these issues can be resolved
- Add -Ztrack-diagnostics information (rust-lang/rustc-dev-guide#1506)
- Add documentation for LLVM KCFI support (rust-lang/rustc-dev-guide#1529)
- Replace references to NoLandingPads in MIR pass documents (rust-lang/rustc-dev-guide#1531)
- share same link (rust-lang/rustc-dev-guide#1530)
- chore: Update `actions/github-script` to v6 (rust-lang/rustc-dev-guide#1521)
- fix: Fix broken links (rust-lang/rustc-dev-guide#1522)
- Remove TyS (rust-lang/rustc-dev-guide#1526)
- Fix small inaccuracy in monomorph page (rust-lang/rustc-dev-guide#1525)
Matthias Krüger [Mon, 19 Dec 2022 19:54:57 +0000 (20:54 +0100)]
Rollup merge of #105801 - zertosh:path_mut_os_str_doc_test, r=dtolnay
Realistic `Path::as_mut_os_str` doctest
With "Implement DerefMut for PathBuf" (#105018) now merged, it's
possible to exercise `Path::as_mut_os_str` (#105002) without going
through `into_boxed_path`.
bors [Mon, 19 Dec 2022 16:46:57 +0000 (16:46 +0000)]
Auto merge of #105698 - joboet:unsupported_threads_once, r=thomcc
Use a more efficient `Once` on platforms without threads
The current implementation uses an atomic queue and spins rather than panicking when calling `call_once` recursively. Since concurrency is not supported on platforms like WASM, `Once` can be implemented much more efficiently using just a single non-atomic state variable.