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`)
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.
Dylan DPC [Mon, 19 Dec 2022 09:11:35 +0000 (14:41 +0530)]
Rollup merge of #105839 - LegionMammal978:mut-upvar-not-send, r=lcnr
Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators
Right now, we suggest a `T: Sync` bound for both `&T` and `&mut T` upvars. A user on URLO [found this confusing](https://users.rust-lang.org/t/error-complains-about-missing-sync-but-send-is-whats-missing/86021), so I wrote this quick fix to look at the mutability before making the suggestion.
Dylan DPC [Mon, 19 Dec 2022 09:11:34 +0000 (14:41 +0530)]
Rollup merge of #105682 - thomcc:expose-ptr-fmt, r=RalfJung
Use `expose_addr()` in `fmt::Pointer`
Discussion in https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Should.20.60fmt.3A.3APointer.60.20expose.20the.20argument.3F on whether or not we should do this (still undecided).
bors [Mon, 19 Dec 2022 06:25:22 +0000 (06:25 +0000)]
Auto merge of #105845 - lqd:revert-thinlto-revert, r=Mark-Simulacrum
Re-enable ThinLTO for rustc on `x86_64-apple-darwin`
ThinLTO was disabled on x64 mac in https://github.com/rust-lang/rust/pull/105646 because of the https://github.com/rust-lang/rust/issues/105637 regression.
It was later discovered that the issue was present on other targets as well, as the mac revert was already landing. The linux/win reverts, however, did not land before the root cause was identified.
https://github.com/rust-lang/rust/pull/105800 fixed the underlying issue in `-Zdylib-lto` handling, and the x64 msvc and linux targets are now fixed, ICEs are using the correct `rustc_driver` panic hook.
This PR re-enables ThinLTO on mac for improved perf now that the issue should be fixed everywhere.
bors [Mon, 19 Dec 2022 03:36:34 +0000 (03:36 +0000)]
Auto merge of #105884 - weihanglo:update-cargo, r=weihanglo
Update cargo
11 commits in cc0a320879c17207bbfb96b5d778e28a2c62030d..c994a4a638370bc7e0ffcbb0e2865afdfa7d4415 2022-12-14 14:46:57 +0000 to 2022-12-18 21:50:58 +0000
- Fix examples of proc-macro crates being scraped for examples (rust-lang/cargo#11497)
- Enable triagebot's relabel functionality (rust-lang/cargo#11498)
- Revert "temporarily disable test `lto::test_profile`" (rust-lang/cargo#11495)
- Bump to 0.69.0, update changelog (rust-lang/cargo#11493)
- Fix typo (rust-lang/cargo#11491)
- Display CPU info in CI (rust-lang/cargo#11488)
- Fix collision_doc_profile test error (rust-lang/cargo#11489)
- fix: Make auto-fix note work with `clippy` (rust-lang/cargo#11399)
- fix(add): use the possessive in error message (rust-lang/cargo#11483)
- Document home crate in contrib docs (rust-lang/cargo#11481)
- Split up registry documentation into multiple sections (rust-lang/cargo#11480)
bors [Mon, 19 Dec 2022 01:13:58 +0000 (01:13 +0000)]
Auto merge of #105883 - matthiaskrgr:rollup-v5n53t1, r=matthiaskrgr
Rollup of 8 pull requests
Successful merges:
- #105419 (Add tests for #41731)
- #105447 (Add a test for #103095)
- #105842 (print argument name in arg mismatch if possible)
- #105863 (Update browser-ui-test version to reduce GUI tests flakyness)
- #105867 (remove redundant fn params that were only "used" in recursion)
- #105869 (don't clone Copy types)
- #105873 (use &str / String literals instead of format!())
- #105879 (Revert "Introduce lowering_arena to avoid creating AST nodes on the fly")
Weihang Lo [Sun, 18 Dec 2022 23:39:39 +0000 (23:39 +0000)]
Update cargo
11 commits in cc0a320879c17207bbfb96b5d778e28a2c62030d..c994a4a638370bc7e0ffcbb0e2865afdfa7d4415
2022-12-14 14:46:57 +0000 to 2022-12-18 21:50:58 +0000
- Fix examples of proc-macro crates being scraped for examples (rust-lang/cargo#11497)
- Enable triagebot's relabel functionality (rust-lang/cargo#11498)
- Revert "temporarily disable test `lto::test_profile`" (rust-lang/cargo#11495)
- Bump to 0.69.0, update changelog (rust-lang/cargo#11493)
- Fix typo (rust-lang/cargo#11491)
- Display CPU info in CI (rust-lang/cargo#11488)
- Fix collision_doc_profile test error (rust-lang/cargo#11489)
- fix: Make auto-fix note work with `clippy` (rust-lang/cargo#11399)
- fix(add): use the possessive in error message (rust-lang/cargo#11483)
- Document home crate in contrib docs (rust-lang/cargo#11481)
- Split up registry documentation into multiple sections (rust-lang/cargo#11480)
bors [Sun, 18 Dec 2022 22:01:39 +0000 (22:01 +0000)]
Auto merge of #105446 - erikdesjardins:vt-size, r=nikic
Add 0..=isize::MAX range metadata to size loads from vtables
This is the (much belated) size counterpart to #91569.
Inspired by https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Range.20metadata.20for.20.60size_of_val.60.20and.20other.20isize.3A.3AMAX.20limits. This could help optimize layout computations based on the size of a dyn trait. Though, admittedly, adding this to vtables wouldn't be as beneficial as adding it to slice len, which is used much more often.
Miri detects this UB already: https://github.com/rust-lang/rust/blob/b7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573/compiler/rustc_const_eval/src/interpret/traits.rs#L119-L121
(In fact Miri goes further, [assuming a 48-bit address space on 64-bit platforms](https://github.com/rust-lang/rust/blob/9db224fc908059986c179fc6ec433944e9cfce50/compiler/rustc_abi/src/lib.rs#L312-L331), but I don't think we can assume that in an optimization.)
bors [Sun, 18 Dec 2022 18:44:37 +0000 (18:44 +0000)]
Auto merge of #105876 - matthiaskrgr:rollup-a9dgzjt, r=matthiaskrgr
Rollup of 7 pull requests
Successful merges:
- #96584 (Fix `x setup -h -v` should work)
- #105420 (Remove dead code after destination propagation)
- #105844 (Make the x tool use the x and x.ps1 scripts)
- #105854 (remove redundant clone)
- #105858 (Another `as_chunks` example)
- #105870 (avoid .into() conversion to identical types)
- #105875 (don't destuct references just to reborrow)
Matthias Krüger [Sun, 18 Dec 2022 17:57:02 +0000 (18:57 +0100)]
Rollup merge of #96584 - bentongxyz:x-setup-h-v-should-work, r=jyn514
Fix `x setup -h -v` should work
r? `@jyn514`
I have to convert profile to path and back in order to remove special-casing in bootstrap. I also check for `dry_run` so that `config.toml` and/ or `.git/hooks/pre-push` will not be created if `--dry-run` is specified.
bors [Sun, 18 Dec 2022 16:03:46 +0000 (16:03 +0000)]
Auto merge of #105714 - jyn514:tidy-first, r=Mark-Simulacrum
Run `x test tidy` sooner in mingw-check
It takes less time to run than the other tests and is more likely to fail. `expand-yaml-anchors` is still run first to make sure the CI files are internally consistent.
Note that changing to `--stage 0` doesn't actually do anything since bootstrap tools are always built with the bootstrap compiler, this just makes it less confusing.