about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-08-09Auto merge of #114666 - bjorn3:sync_cg_clif-2023-08-09, r=bjorn3bors-110/+194
Sync rustc_codegen_cranelift A couple of small bug fixes this time. In addition I fixed the test suite after the introduction of `#![deny(internal_feature)]` broke it. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-08-09Merge commit '8f9ac9c22d6594cf059d8e6c71d414cc5ccd7975' into ↵bjorn3-110/+194
sync_cg_clif-2023-08-09
2023-08-09Auto merge of #88936 - estebank:send-sync, r=nagisabors-13/+223
Suggest using `Arc` on `!Send`/`!Sync` types
2023-08-09Suggest using `Arc` on `!Send`/`!Sync` typesEsteban Kuber-13/+223
2023-08-09Fix MinGWbjorn3-0/+1
2023-08-09Auto merge of #114649 - Kobzol:bolt-remove-use-old-text, r=nikicbors-1/+6
Remove usage of `--use-old-text` for BOLT This flag has [reduced](https://github.com/rust-lang/rust/pull/114141) the size of `libLLVM.so` by ~50 MiB, but sadly it is quite non-deterministic and the size savings frequently fail, thus causing large artifact size [swings](https://github.com/rust-lang/rust/pull/114297#issuecomment-1670292387). To avoid the swings, it would be better to just disable the flag for now. r? `@nikic`
2023-08-09Fix rustc test suitebjorn3-3/+5
2023-08-09Rustup to rustc 1.73.0-nightly (03a119b0b 2023-08-07)bjorn3-5/+29
2023-08-09Remove usage of `--use-old-text` for BOLTJakub Beránek-1/+6
2023-08-09Auto merge of #114646 - matthiaskrgr:rollup-xf7qnmn, r=matthiaskrgrbors-1625/+272
Rollup of 6 pull requests Successful merges: - #113939 (open pidfd in child process and send to the parent via SOCK_SEQPACKET+CMSG) - #114548 (Migrate a trait selection error to use diagnostic translation) - #114606 (fix: not insert missing lifetime for `ConstParamTy`) - #114634 (Mention riscv64-linux-android support in Android documentation) - #114638 (Remove old RPITIT tests (revisions were removed)) - #114641 (Rename copying `ascii::Char` methods from `as_` to `to_`) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-09Rollup merge of #114641 - kupiakos:ascii-char-to-not-as, r=scottmcmMatthias Krüger-4/+4
Rename copying `ascii::Char` methods from `as_` to `to_` Tracking issue: #110998. The [API guidelines][naming] describe `as_` as used for borrowed -> borrowed operations, and `to_` for owned -> owned operations on `Copy` types. [naming]: https://rust-lang.github.io/api-guidelines/naming.html
2023-08-09Rollup merge of #114638 - compiler-errors:rpitit-test-revisions, r=spastorinoMatthias Krüger-1483/+0
Remove old RPITIT tests (revisions were removed) These tests were not cleaned up after #112988. r? `@spastorino`
2023-08-09Rollup merge of #114634 - chriswailes:android-platform-doc-update, ↵Matthias Krüger-0/+2
r=Mark-Simulacrum Mention riscv64-linux-android support in Android documentation This CL brings the android.md file in-line with the list of supported targets from platform-support.md. Followup to https://github.com/rust-lang/rust/pull/112858 r? `@Mark-Simulacrum`
2023-08-09Rollup merge of #114606 - bvanjoi:fix-113462, r=compiler-errorsMatthias Krüger-7/+31
fix: not insert missing lifetime for `ConstParamTy` Fixes #113462 We should ignore the missing lifetime, as it's illegal to include a lifetime in a const param. r? ``@compiler-errors``
2023-08-09Rollup merge of #114548 - fee1-dead-contrib:migrate-to-trans, r=davidtwcoMatthias Krüger-41/+79
Migrate a trait selection error to use diagnostic translation
2023-08-09Rollup merge of #113939 - the8472:pidfd-from-child, r=Mark-SimulacrumMatthias Krüger-90/+156
open pidfd in child process and send to the parent via SOCK_SEQPACKET+CMSG This avoids using `clone3` when a pidfd is requested while still getting it in a 100% race-free manner by passing it up from the child process. This should solve most concerns in #82971
2023-08-09Auto merge of #99747 - ankane:float_gamma, r=workingjubileebors-4/+161
Add gamma function to f32 and f64 Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C). Refs: - https://github.com/rust-lang/rfcs/issues/864 - https://github.com/rust-lang/rust/issues/18271
2023-08-09Auto merge of #114470 - ↵bors-3/+55
pnkfelix:dont-export-no-mangle-from-proc-macros-issue-99978, r=bjorn3 Restrict linker version script of proc-macro crates to just its two symbols Restrict linker version script of proc-macro crates to just the two symbols of each proc-macro crate. The main known effect of doing this is to stop including `#[no_mangle]` symbols in the linker version script. Background: The combination of a proc-macro crate with an import of another crate that itself exports a no_mangle function was broken for a period of time, because: * In PR #99944 we stopped exporting no_mangle symbols from proc-macro crates; proc-macro crates have a very limited interface and are meant to be treated as a blackbox to everything except rustc itself. However: he constructed linker version script still referred to them, but resolving that discrepancy was left as a FIXME in the code, tagged with issue #99978. * In PR #108017 we started telling the linker to check (via the`--no-undefined-version` linker invocation flag) that every symbol referenced in the "linker version script" is provided as linker input. So the unresolved discrepancy from #99978 started surfacing as a compile-time error (e.g. #111888). Fix #111888 Fix #99978.
2023-08-08Rename copying `ascii::Char` methods from `as_` to `to_`Alyssa Haroldsen-4/+4
Tracking issue: #110998. The [API guidelines][naming] describe `as` as used for borrowed -> borrowed operations, and `to_` for owned -> owned operations on `Copy` types. [naming]: https://rust-lang.github.io/api-guidelines/naming.html
2023-08-08Auto merge of #114637 - matthiaskrgr:rollup-544y8p5, r=matthiaskrgrbors-205/+439
Rollup of 11 pull requests Successful merges: - #106425 (Make ExitStatus implement Default) - #113480 (add aarch64-unknown-teeos target) - #113586 (Mention style for new syntax in tracking issue template) - #113593 (CFI: Fix error compiling core with LLVM CFI enabled) - #114612 (update llvm-wrapper include to silence deprecation warning) - #114613 (Prevent constant rebuilds of `rustc-main` (and thus everything else)) - #114615 (interpret: remove incomplete protection against invalid where clauses) - #114628 (Allowing re-implementation of mir_drops_elaborated query) - #114629 (tests: Uncomment now valid GAT code behind FIXME) - #114630 (Migrate GUI colors test to original CSS color format) - #114631 (add provisional cache test for new solver) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-08Remove dangling testsMichael Goulet-1483/+0
2023-08-08open pidfd in child process and send to the parent via SOCK_SEQPACKET+CMSGThe 8472-90/+156
This is a 100% race-free way to obtain a child's pidfd while avoiding `clone3`.
2023-08-08Rollup merge of #114631 - lcnr:chalk-cycle-test, r=compiler-errorsMatthias Krüger-0/+75
add provisional cache test for new solver wrote it for chalk in https://github.com/rust-lang/chalk/pull/788 and never added it to the new solver. r? ``@compiler-errors``
2023-08-08Rollup merge of #114630 - GuillaumeGomez:migrate-gui-test-color-30, r=notriddleMatthias Krüger-36/+36
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-08-08Rollup merge of #114629 - Enselic:uncomment-gat-code, r=compiler-errorsMatthias Krüger-2/+1
tests: Uncomment now valid GAT code behind FIXME The code fails to parse with `nightly-2021-02-05`: $ cargo +nightly-2021-02-05 build error: generic associated types in trait paths are currently not implemented --> src/main.rs:9:42 | 9 | fn _bar<T: for<'a> StreamingIterator<Item<'a> = &'a [i32]>>(_iter: T) { /* ... */ | ^^^^ but parses with `nightly-2021-02-06`: $ cargo +nightly-2021-02-06 build warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes warning: 1 warning emitted because it was (with high probability) fixed by #79554 which was merged within that nightly range. This PR is part of #44366 which is E-help-wanted.
2023-08-08Rollup merge of #114628 - cedihegi:master, r=oli-obkMatthias Krüger-2/+4
Allowing re-implementation of mir_drops_elaborated query For our use case of the rust compiler interface (a rust verifier called [Prusti](https://github.com/viperproject/prusti-dev/)), it would be extremely useful if we were able to "copy" the implementation of the `mir_drops_elaborated_and_const_checked` query to override it. This would mean that the following items would need to be made public: >https://github.com/rust-lang/rust/blob/6d55184d05c9bd3c46b294dcad3bfb1d0907e871/compiler/rustc_mir_transform/src/lib.rs#L434 >https://github.com/rust-lang/rust/blob/6d55184d05c9bd3c46b294dcad3bfb1d0907e871/compiler/rustc_mir_transform/src/inline.rs#L32 (for the latter its module needs to be public or it needs to be re-exported) To explain why (we think) this is necessary: I am currently working on a new feature, where we try to modify the generated executables by inserting certain additional checks, and potentially perform some optimizations based on verification results. We are using the rust compiler interface and most of our goals can be achieved by overriding queries, in our case this is currently `mir_drops_elaborated_and_const_checked`. However, at the moment this approach is somewhat limited. When overriding queries, we can call and steal the base-query and then modify the results before allocating and returning those. The problem is that the verification works with a copy of `mir_promoted`. For the modifications we want to make to the mir, we would often want to rely on results of the verifier that refer to Locations in the `mir_promoted`. We can not modify the `mir_promoted` query using these results, because to run the verification we also need the results of `mir_borrowck()`, which means `mir_promoted` will already be constructed and cached. The Locations we get from the verifier are also no longer usable to modify `mir_drops_elaborated_and_const_checked`, because the MIR obviously changes between those 2 phases. Tracking all Locations between the two seems to be pretty much unfeasible, and would also be extremely unstable. By being able to override the query with its original implementation, we could modify the MIR before drop elaboration and the various other passes are performed. I have spent quite a bit of time investigating other solutions, and didn't find any other way solving this problem. If I still missed something I would of course be happy to hear any suggestions that do not require exposing more internal compiler functionality. However, I think being able to re-implement certain queries could also benefit other use cases in the future, for example in PR #108328 one of the approaches discussed involved doing the same thing for `mir_promoted`.
2023-08-08Rollup merge of #114615 - RalfJung:interpret-invalid-where, r=lcnrMatthias Krüger-84/+16
interpret: remove incomplete protection against invalid where clauses Cc https://github.com/rust-lang/rust/issues/97477, https://github.com/rust-lang/project-const-generics/issues/37 r? ``@lcnr``
2023-08-08Rollup merge of #114613 - ferrocene:pa-fix-rebuild, r=lqdMatthias Krüger-21/+36
Prevent constant rebuilds of `rustc-main` (and thus everything else) PR #114305 changed bootstrap to run `strip -g` on `librustc_driver.so` and `libllvm.so` on Linux when no debuginfo was requested. Unfortunately, that PR resulted in bootstrap always rebuilding everything starting from stage 1 `rustc-main` (including stage 1 libraries and tests) when invoking bootstrap multiple times. We noticed this because Ferrocene's CI times increased to between 2x and 3x total execution time, but the regression can also be reproduced locally by running `./x build library/sysroot --stage 1` twice. The explanation of the problem is in the code comments. r? ```@lqd``` cc ```@ozkanonur```
2023-08-08Rollup merge of #114612 - lqd:east-17-warning, r=nikicMatthias Krüger-2/+0
update llvm-wrapper include to silence deprecation warning Includes of `include/llvm/Support/Host.h` now emit a deprecated warning: `warning: This header is deprecated, please use llvm/TargetParser/Host.h`. I don't believe we are using this include. I don't believe we need to bump the `download-ci-llvm` stamp since these warnings are emitted while building the `llvm-wrapper`. r? ```@nikic```
2023-08-08Rollup merge of #113593 - rcvalle:rust-cfi-fix-90546, r=wesleywiserMatthias Krüger-31/+90
CFI: Fix error compiling core with LLVM CFI enabled Fix #90546 by filtering out global value function pointer types from the type tests, and adding the LowerTypeTests pass to the rustc LTO optimization pipelines.
2023-08-08Rollup merge of #113586 - compiler-errors:style, r=joshtriplettMatthias Krüger-0/+3
Mention style for new syntax in tracking issue template `@rust-lang/style` would like the specification of new syntax in the style guide to be part of the feature stabilization process, in order to avoid situations where new syntax is stabilized and it never has style specified or formatting implemented for it. This most recently occurred with [let-else](https://blog.rust-lang.org/2023/07/01/rustfmt-supports-let-else-statements.html). We've made a lot of progress with the [nightly style procedure](https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md) to unblock rustfmt from experimenting with formatting for new syntax, and T-style's existence means we actually have people who are willing and qualified to make decisions about formatting specification. This check-box should also perhaps include "formatting support implemented in rustfmt", but that's really up to `@rust-lang/rustfmt,` so I'm not volunteering them for any new responsibilities in this PR just yet. Putting this up mostly to discuss with T-lang, though feedback welcome from anyone. --- As more of an implementation detail: alternatively, instead of a this could be just added to the existing rustc-dev-guide chapter(s) on stabilization. r? `@ghost`
2023-08-08Rollup merge of #113480 - Sword-Destiny:master, r=petrochenkovMatthias Krüger-3/+153
add aarch64-unknown-teeos target TEEOS is a mini os run in TrustZone, for trusted/security apps. The libc of TEEOS is a part of musl. The kernel of TEEOS is micro kernel. This MR is to add a target for teeos. MRs for libc and rust-std are in progress. Compiler team MCP: [MCP](https://github.com/rust-lang/compiler-team/issues/652)
2023-08-08Rollup merge of #106425 - ijackson:exit-status-default, r=dtolnayMatthias Krüger-24/+25
Make ExitStatus implement Default And, necessarily, make it inhabited even on platforms without processes. I noticed while preparing https://github.com/rust-lang/rfcs/pull/3362 that there was no way for anyone to construct an `ExitStatus`. This would be insta-stable so needs an FCP.
2023-08-08Auto merge of #114545 - fee1-dead-contrib:lower-impl-effect, r=oli-obkbors-371/+463
correctly lower `impl const` to bind to host effect param r? `@oli-obk`
2023-08-08Migrate GUI colors test to original CSS color formatGuillaume Gomez-36/+36
2023-08-08Mention riscv64-linux-android support in Android documentationChris Wailes-0/+2
This CL brings the android.md file in-line with the list of supported targets from platform-support.md.
2023-08-08Sync from rust 03a119b0b0e310d22d94399b24ed030056050f13bjorn3-35/+39
2023-08-08add test from chalk#788 for new solverlcnr-0/+75
2023-08-08Auto merge of #114439 - Kobzol:remark-pgo-hotness, r=tmiaskobors-1/+36
Add hotness data to LLVM remarks Slight improvement of https://github.com/rust-lang/rust/pull/113040. This makes sure that if PGO is used, remarks generated using `-Zremark-dir` will include the `Hotness` attribute. r? `@tmiasko`
2023-08-08fix proc-macro test added here to solely be exercised as a build product for ↵Felix S. Klock II-0/+4
the host. thus we should no longer see test failures for e.g. wasm32 target.
2023-08-08Added comment on reason for method being publiccedihegi-0/+2
2023-08-08tests: Uncomment now valid GAT code behind FIXMEMartin Nordholts-2/+1
The code fails to parse with `nightly-2021-02-05`: $ cargo +nightly-2021-02-05 build error: generic associated types in trait paths are currently not implemented --> src/main.rs:9:42 | 9 | fn _bar<T: for<'a> StreamingIterator<Item<'a> = &'a [i32]>>(_iter: T) { /* ... */ | ^^^^ but parses with `nightly-2021-02-06`: $ cargo +nightly-2021-02-06 build warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes warning: 1 warning emitted because it was (with high probability) fixed by PR 79554 which was merged within that nightly range.
2023-08-08Allow reimplementation of drops_elaborated querycedihegi-2/+2
Make module inner and function run_analysis_to_runtime_passes in rustc_mir_transform public to allow re-implementing the query from the rust compiler interface.
2023-08-08Only enable hotness information when PGO is availableJakub Beránek-3/+13
2023-08-08Auto merge of #114602 - compiler-errors:rpit-outlives-sadness, r=oli-obkbors-218/+194
Map RPIT duplicated lifetimes back to fn captured lifetimes Use the [`lifetime_mapping`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.OpaqueTy.html#structfield.lifetime_mapping) to map an RPIT's captured lifetimes back to the early- or late-bound lifetimes from its parent function. We may be going thru several layers of mapping, since opaques can be nested, so we introduce `TyCtxt::map_rpit_lifetime_to_fn_lifetime` to loop through several opaques worth of mapping, and handle turning it into a `ty::Region` as well. We can then use this instead of the identity substs for RPITs in `check_opaque_meets_bounds` to address #114285. We can then also use `map_rpit_lifetime_to_fn_lifetime` to properly install bidirectional-outlives predicates for both RPITs and RPITITs. This addresses #114601. I based this on #114574, but I don't actually know how much of that PR we still need, so some code may be redundant now... :shrug: --- Fixes #114597 Fixes #114579 Fixes #114285 Also fixes #114601, since it turns out we had other bugs with RPITITs and their duplicated lifetime params :sweat_smile:. Supersedes #114574 r? `@oli-obk`
2023-08-08remove llvm-wrapper include to silence deprecation warningRémy Rakic-2/+0
Includes of `include/llvm/Support/Host.h` now emit a deprecated warning: `warning: This header is deprecated, please use llvm/TargetParser/Host.h`.
2023-08-08Auto merge of #114339 - ttsugriy:unsafe-utf8, r=davidtwcobors-1/+4
[rustc_data_structures][base_n][perf] Remove unnecessary utf8 check. Since all output characters taken from `BASE_64` are valid UTF8 chars there is no need to waste cycles on validation. Even though it's obviously a perf win, I've also used a [benchmark](https://gist.github.com/ttsugriy/e1e63c07927d8f31e71695a9c617bbf3) on M1 MacBook Air with following results: ``` Running benches/base_n_benchmark.rs (target/release/deps/base_n_benchmark-825fe5895b5c2693) push_str/old time: [14.670 µs 14.852 µs 15.074 µs] Found 11 outliers among 100 measurements (11.00%) 4 (4.00%) high mild 7 (7.00%) high severe push_str/new time: [12.573 µs 12.674 µs 12.801 µs] Found 11 outliers among 100 measurements (11.00%) 7 (7.00%) high mild 4 (4.00%) high severe ```
2023-08-08prevent constant rebuilds of rustc-main (and thus everything else)Pietro Albini-21/+36
2023-08-08add'l testMichael Goulet-0/+15
2023-08-08Simplify via map_rpit_lifetime_to_fn_lifetimeMichael Goulet-145/+21