about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-12Flatten redundant test module `run_make_support::diff::tests::tests`Zalathar-36/+30
2024-10-11Auto merge of #131531 - onur-ozkan:move-dummy-commit, r=Kobzolbors-17/+19
move dummy commit logic into x86_64-gnu-llvm-18 Doing the dummy commit logic in a runner that uses CI-LLVM breaks in merge CI. This should be properly fixed by https://github.com/rust-lang/rust/pull/131358 (see the [actual problem](https://github.com/rust-lang/rust/pull/131448#issuecomment-2406516261)). Since we can also fix it by moving the dummy commit into the runner where we use in-tree LLVM, so why not do that as well?
2024-10-11Auto merge of #131547 - matthiaskrgr:rollup-ui4p744, r=matthiaskrgrbors-95/+225
Rollup of 6 pull requests Successful merges: - #129079 (Create `_imp__` symbols also when doing ThinLTO) - #131208 (ABI: Pass aggregates by value on AIX) - #131394 (fix(rustdoc): add space between struct fields and their descriptions) - #131519 (Use Default visibility for rustc-generated C symbol declarations) - #131541 (compiletest: Extract auxiliary-crate properties to their own module/struct) - #131542 (next-solver: remove outdated FIXMEs) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-11Rollup merge of #131542 - lcnr:new-solver-fixmes, r=compiler-errorsMatthias Krüger-15/+6
next-solver: remove outdated FIXMEs r? `@compiler-errors`
2024-10-11Rollup merge of #131541 - Zalathar:aux-props, r=jieyouxuMatthias Krüger-68/+87
compiletest: Extract auxiliary-crate properties to their own module/struct This moves the values of the 4 different `aux-*` directives into their own sub-struct. That struct, along with its directive-parsing code, can then be shared by both `TestProps` and `EarlyProps`. The final patch also fixes an oversight in up-to-date checking, by including *all* auxiliary crates in the timestamp, not just ordinary `aux-build` ones.
2024-10-11Rollup merge of #131519 - davidlattimore:intrinsics-default-vis, r=UrgauMatthias Krüger-4/+19
Use Default visibility for rustc-generated C symbol declarations Non-default visibilities should only be used for definitions, not declarations, otherwise linking can fail. This is based on https://github.com/rust-lang/rust/pull/123994. Issue https://github.com/rust-lang/rust/issues/123427 When I changed `default-hidden-visibility` to `default-visibility` in https://github.com/rust-lang/rust/pull/130005, I updated all places in the code that used `default-hidden-visibility`, replicating the hidden-visibility bug to also happen for protected visibility. Without this change, trying to build rustc with `-Z default-visibility=protected` fails with a link error.
2024-10-11Rollup merge of #131394 - ↵Matthias Krüger-0/+3
ismailarilik:fix/rustdoc/add-space-between-struct-fields-and-their-descriptions, r=GuillaumeGomez fix(rustdoc): add space between struct fields and their descriptions Stolen from #128541. Fixes #128260. <table> <thead> <tr> <th scope="col">Before</th> <th scope="col">After</th> </tr> </thead> <tbody> <tr> <td scope="row"> <img src="https://github.com/user-attachments/assets/b1d3cb47-77c9-4897-a5d2-2192b11cb8a3" /> </td> <td> <img src="https://github.com/user-attachments/assets/0b104672-d2be-49f4-ac9b-3506526fe2f1" /> </td> </tr> </tbody> </table> <table> <thead> <tr> <th scope="col">Before</th> <th scope="col">After</th> </tr> </thead> <tbody> <tr> <td scope="row"> <img src="https://github.com/user-attachments/assets/650c3e74-a067-492a-9ba3-557f9214f875" /> </td> <td> <img src="https://github.com/user-attachments/assets/413ef9b0-8fca-4e16-978a-7b88d05299dc" /> </td> </tr> </tbody> </table> Unlike original PR, I didn't add space between field headers; I put it between headers and descriptions. So if there are only headers, the space is not changed. Otherwise, I put a space like the space between paragraphs (.75em) which makes sense for me but feel free to adjust it or ask me to do so. r? `@GuillaumeGomez`
2024-10-11Rollup merge of #131208 - mustartt:aix-call-abi, r=davidtwcoMatthias Krüger-7/+52
ABI: Pass aggregates by value on AIX On AIX we pass aggregates byval. Adds new ABI for AIX for powerpc64. https://github.com/llvm/llvm-project/blob/313ad85dfa40a18f2edefd7ce2edc0528d5a554a/clang/lib/CodeGen/Targets/PPC.cpp#L216 Fixes the following 2 testcases on AIX: ``` tests/ui/abi/extern/extern-pass-TwoU16s.rs tests/ui/abi/extern/extern-pass-TwoU8s.rs ```
2024-10-11Rollup merge of #129079 - Zoxc:thinlto_imp_symbols, r=wesleywiserMatthias Krüger-1/+58
Create `_imp__` symbols also when doing ThinLTO When generating a rlib crate on Windows we create `dllimport` / `_imp__` symbols for each global. This effectively makes the rlib contain an import library for itself and allows them to both be dynamically and statically linked. However when doing ThinLTO we do not generate these and thus we end up with missing symbols. Microsoft's `link` can fix these up (and emits warnings), but `lld` seems to currently be unable to. This PR also does this generation for ThinLTO avoiding those issues with `lld` and also avoids the warnings on `link`. This is an workaround for https://github.com/rust-lang/rust/issues/81408. cc `@lqd`
2024-10-11Auto merge of #131045 - compiler-errors:remove-unnamed_fields, r=wesleywiserbors-3708/+32
Retire the `unnamed_fields` feature for now `#![feature(unnamed_fields)]` was implemented in part in #115131 and #115367, however work on that feature has (afaict) stalled and in the mean time there have been some concerns raised (e.g.[^1][^2]) about whether `unnamed_fields` is worthwhile to have in the language, especially in its current desugaring. Because it represents a compiler implementation burden including a new kind of anonymous ADT and additional complication to field selection, and is quite prone to bugs today, I'm choosing to remove the feature. However, since I'm not one to really write a bunch of words, I'm specifically *not* going to de-RFC this feature. This PR essentially *rolls back* the state of this feature to "RFC accepted but not yet implemented"; however if anyone wants to formally unapprove the RFC from the t-lang side, then please be my guest. I'm just not totally willing to summarize the various language-facing reasons for why this feature is or is not worthwhile, since I'm coming from the compiler side mostly. Fixes #117942 Fixes #121161 Fixes #121263 Fixes #121299 Fixes #121722 Fixes #121799 Fixes #126969 Fixes #131041 Tracking: * https://github.com/rust-lang/rust/issues/49804 [^1]: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Unnamed.20struct.2Funion.20fields [^2]: https://github.com/rust-lang/rust/issues/49804#issuecomment-1972619108
2024-10-11move dummy commit logic into x86_64-gnu-llvm-18onur-ozkan-17/+19
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-11remove outdated FIXMEslcnr-15/+6
2024-10-11Auto merge of #131540 - matthiaskrgr:rollup-elbgu1w, r=matthiaskrgrbors-61/+515
Rollup of 6 pull requests Successful merges: - #131464 (Update wasm-component-ld to 0.5.10) - #131476 (coverage: Include the highest counter ID seen in `.cov-map` dumps) - #131497 (Add myself to bootstrap review rotation) - #131498 (Consider outermost const-anon in `non_local_def` lint) - #131512 (Fixing rustDoc for LayoutError.) - #131529 (rustdoc-json-types: fix typo in comment) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-11Include all kinds of auxiliary crates in the up-to-date timestampZalathar-1/+17
This was previously only including ordinary `aux-build` crates, and not files associated with the other three kinds of auxiliary crate.
2024-10-11Use the same `AuxProps` parser for `EarlyProps`Zalathar-28/+9
2024-10-11Extract auxiliary-crate properties to their own module/structZalathar-40/+62
2024-10-11Rollup merge of #131529 - suaviloquence:1-fix-typo, r=aDotInTheVoidMatthias Krüger-1/+1
rustdoc-json-types: fix typo in comment
2024-10-11Rollup merge of #131512 - j7nw4r:master, r=jhprattMatthias Krüger-1/+2
Fixing rustDoc for LayoutError. I started reading the the std lib from start to finish and noticed that this rustdoc comment wasn't correct.
2024-10-11Rollup merge of #131498 - Urgau:transparent-const-anons, r=lcnrMatthias Krüger-34/+148
Consider outermost const-anon in `non_local_def` lint This PR change the logic for finding the parent of the `impl` definition in the `non_local_definitions` lint to consider multiple level of const-anon items, instead of only one currently. I also took the opportunity to cleanup the related code. cc ``@traviscross`` Fixes https://github.com/rust-lang/rust/issues/131474
2024-10-11Rollup merge of #131497 - jieyouxu:spin, r=onur-ozkanMatthias Krüger-0/+1
Add myself to bootstrap review rotation r? `@onur-ozkan`
2024-10-11Rollup merge of #131476 - Zalathar:highest-counter, r=jieyouxuMatthias Krüger-0/+338
coverage: Include the highest counter ID seen in `.cov-map` dumps When making changes that have a large impact on coverage counter creation, this makes it easier to see whether the number of physical counters has changed. (The highest counter ID seen in coverage maps is not necessarily the same as the number of physical counters actually used by the instrumented code, but it's the best approximation we can get from looking only at the coverage maps, and it should be reasonably accurate in most cases.) Extracted from #131398, since I'm still considering whether to make those changes as-is, whereas this PR is useful and good on its own.
2024-10-11Rollup merge of #131464 - alexcrichton:update-wasm-component-ld, r=jieyouxuMatthias Krüger-25/+25
Update wasm-component-ld to 0.5.10 This pulls in a bug fix relative to the 0.5.9 release which was updated-to recently.
2024-10-11coverage: Include the highest counter ID seen in `.cov-map` dumpsZalathar-0/+338
When making changes that have a large impact on coverage counter creation, this makes it easier to see whether the number of physical counters has changed. (The highest counter ID seen in coverage maps is not necessarily the same as the number of physical counters actually used by the instrumented code, but it's the best approximation we can get from looking only at the coverage maps, and it should be reasonably accurate in most cases.)
2024-10-11Consider outermost const-anon in non_local_def lintUrgau-34/+148
2024-10-11Auto merge of #131532 - Zalathar:rollup-688kw5t, r=Zalatharbors-128/+52
Rollup of 3 pull requests Successful merges: - #131305 (make `llvm::is_ci_llvm_modified` logic more precise) - #131524 (compiletest: Remove the magic hacks for finding output with `lto=thin`) - #131525 (compiletest: Simplify the choice of `--emit` mode for assembly tests) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-11Rollup merge of #131525 - Zalathar:emit-asm, r=jieyouxuStuart Cook-17/+8
compiletest: Simplify the choice of `--emit` mode for assembly tests Tiny little cleanup that I noticed while working on #131524. No functional change. Historically, the original code structure (#58791) predates the `Emit` enum (#103298), so it was manually adding `--emit` flags to the compiler invocation. But now the match can just evaluate to the appropriate `Emit` value directly.
2024-10-11Rollup merge of #131524 - Zalathar:less-thinlto-magic, r=jieyouxuStuart Cook-78/+6
compiletest: Remove the magic hacks for finding output with `lto=thin` This hack was intended to handle the case where `-Clto=thin` causes the compiler to emit multiple output files (when producing LLVM-IR or assembly). The hack only affects 4 tests, of which 3 are just meta-tests for the hack itself. The one remaining test that motivated the hack currently doesn't even need it! (`tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs`)
2024-10-11Rollup merge of #131305 - onur-ozkan:131303, r=KobzolStuart Cook-33/+38
make `llvm::is_ci_llvm_modified` logic more precise Fixes #131303.
2024-10-10fix typo in rustdoc-json-types commentm-1/+1
2024-10-11Auto merge of #131517 - aDotInTheVoid:rdj-safe-extern-test, r=GuillaumeGomezbors-0/+17
rustdoc-json: Add tests for unsafe/safe extern blocks (RFC 3484) Closes https://github.com/rust-lang/rust/issues/126786, turns out this all Just Works (TM) Tracking issue: #123743 r? `@GuillaumeGomez`
2024-10-11Simplify the choice of `--emit` mode for assembly testsZalathar-17/+8
2024-10-11compiletest: Remove the magic hacks for finding output with `lto=thin`Zalathar-78/+6
This hack was intended to handle the case where `-Clto=thin` causes the compiler to emit multiple output files (when producing LLVM-IR or assembly). The hack only affects 4 tests, of which 3 are just meta-tests for the hack itself. The one remaining test that motivated the hack currently doesn't even need it! (`tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs`)
2024-10-10Auto merge of #131444 - onur-ozkan:hotfix-ci, r=Kobzolbors-29/+12
stabilize `ci_rustc_if_unchanged_logic` test Makes `ci_rustc_if_unchanged_logic` test more stable and re-enables it. Previously, it was expecting CI-rustc to be used all the time when there were no changes, which wasn’t always the case. Purpose of this test is making sure we don't use CI-rustc while there are changes in compiler and/or library, but we don't really need to cover cases where CI-rustc is not enabled. Second commit was pushed for making a change in the compiler tree, so `ci_rustc_if_unchanged_logic` can be tested properly in merge CI.
2024-10-11Use Default visibility for rustc-generated C symbol declarationsDavid Lattimore-4/+19
Non-default visibilities should only be used for definitions, not declarations, otherwise linking can fail. Co-authored-by: Collin Baker <collinbaker@chromium.org>
2024-10-10rustdoc-json: Add tests for unsafe/safe extern blocks (RFC 3484)Alona Enraght-Moony-0/+17
2024-10-10Auto merge of #131511 - matthiaskrgr:rollup-56qr0e5, r=matthiaskrgrbors-869/+1047
Rollup of 9 pull requests Successful merges: - #130308 (codegen_ssa: consolidate tied target checks) - #130538 (Stabilize const `{slice,array}::from_mut`) - #130741 (rustc_target: Add sme-b16b16 as an explicit aarch64 target feature) - #131033 (Precise capturing in traits) - #131442 (Match std `RUSTFLAGS` for host and target for `mir-opt` test suite to fix double std build/rebuilds) - #131470 (add test infra to explicitely test rustc with autodiff/enzyme disabled) - #131475 (Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible" ) - #131493 (Avoid redundant sysroot additions to `PATH` when linking) - #131509 (Update .mailmap) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-10Fixing rustDoc for LayoutError.Johnathan W-1/+2
2024-10-10Rollup merge of #131509 - P1n3appl3:patch-1, r=aDotInTheVoidMatthias Krüger-0/+1
Update .mailmap r? `@aDotInTheVoid`
2024-10-10Rollup merge of #131493 - madsmtm:avoid-redundant-linker-path, r=jieyouxuMatthias Krüger-0/+2
Avoid redundant sysroot additions to `PATH` when linking Currently, `rustc` prepends `$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin` to the `PATH` three times before invoking the linker, which is unnecessary, once should be enough. Spotted this while trying to get `-Clinker-flavor=gcc` and `-Clinker-flavor=ld` closer together, not really important. `````@rustbot````` A-linkage
2024-10-10Rollup merge of #131475 - fmease:compiler-mv-obj-safe-dyn-compat-2, r=jieyouxuMatthias Krüger-531/+535
Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible" Follow-up to #130826. Part of #130852. 1. 1st commit: Fix stupid oversights. Should've been part of #130826. 2. 2nd commit: Rename the unstable feature `object_safe_for_dispatch` to `dyn_compatible_for_dispatch`. Might not be worth the churn, you decide. 3. 3rd commit: Apply the renaming to all UI tests (contents and paths).
2024-10-10Rollup merge of #131470 - EnzymeAD:enzyme-testinfra2, r=jieyouxuMatthias Krüger-0/+7
add test infra to explicitely test rustc with autodiff/enzyme disabled I assume this is not what you want for now, but I'll update the PR once I understand how the ignore- directives work. To summarize the situation, we want a feature gate test where we don't enable the autodiff feature using `#![feature(autodiff)]`. There are two situations. 1) We have a rustc which was build without autodiff support (current default): It gives one error about the feature being needed and one error about this rustc version being build without autodiff support. 2) We have a rustc which was build with autodiff support (i.e. for now a custom build): It gives one error about the feature being needed. We have a `//`````@needs-enzyme`````` directive which we can use in revisions for the second case. However, we have no way to specify that needs-enzyme implies that the second error should not be seen. This ads a way of passing the following test: ``` //@ revisions: has_support no_support //`````@[has_support]````` needs-enzyme //`````@[no_support]````` needs-enzyme-disabled #![crate_type = "lib"] #[autodiff(dfoo, Reverse)] //[has_support]~^ ERROR use of unstable library feature 'autodiff' [E0658] //[no_support]~^^ ERROR use of unstable library feature 'autodiff' [E0658] //[no_support]~| ERROR this rustc version does not support autodiff fn foo() {} ``` Cherry picking this PR to my frontend pr makes the test above pass in both configurations (enzyme=true/false in config.toml). I'm open to other changes that make this testcase pass. r? `````@jieyouxu````` Tracking: - https://github.com/rust-lang/rust/issues/124509
2024-10-10Rollup merge of #131442 - jieyouxu:mir-opt-rebuild, r=onur-ozkanMatthias Krüger-1/+5
Match std `RUSTFLAGS` for host and target for `mir-opt` test suite to fix double std build/rebuilds Previously the bootstrap compiletest `Step::run` flow had: ```rs // ensure that `libproc_macro` is available on the host. builder.ensure(compile::Std::new(compiler, compiler.host)); // ... if suite == "mir-opt" { builder.ensure(compile::Std::new_for_mir_opt_tests(compiler, target)); } else { builder.ensure(compile::Std::new(compiler, target)); } ``` This can cause unnecessary std rebuilds (even on the same invocation) because if host == target then `builder.ensure(compile::Std::new_for_mir_opt_tests(compiler, target))` will have different `RUSTFLAGS` than `builder.ensure(compile::Std::new(compiler, compiler.host))`. This PR fixes that by matching up std `RUSTFLAGS` if the test suite is `mir-opt`: ```rs if suite == "mir-opt" { builder.ensure(compile::Std::new_for_mir_opt_tests(compiler, compiler.host)); } else { builder.ensure(compile::Std::new(compiler, compiler.host)); } ``` This is a short-term fix, the better fix is to enforce how `RUSTFLAGS` are handled as described in https://github.com/rust-lang/rust/issues/131437#issuecomment-2401710727. Fixes #131437.
2024-10-10Rollup merge of #131033 - compiler-errors:precise-capturing-in-traits, ↵Matthias Krüger-164/+309
r=spastorino Precise capturing in traits This PR begins to implement `feature(precise_capturing_in_traits)`, which enables using the `impl Trait + use<..>` syntax for RPITITs. It implements this by giving the desugared GATs variance, and representing the uncaptured lifetimes as bivariant, like how opaque captures work. Right now, I've left out implementing a necessary extension to the `refining_impl_trait` lint, and also I've made it so that all RPITITs always capture the parameters that come from the trait, because I'm not totally yet convinced that it's sound to not capture these args. It's certainly required to capture the type and const parameters from the trait (e.g. Self), or else users could bivariantly relate two RPITIT args that come from different impls, but region parameters don't affect trait selection in the same way, so it *may* be possible to relax this in the future. Let's stay conservative for now, though. I'm not totally sure what tests could be added on top of the ones I already added, since we really don't need to exercise the `precise_capturing` feature but simply what makes it special for RPITITs. r? types Tracking issue: * #130044
2024-10-10Rollup merge of #130741 - mrkajetanp:detect-b16b16, r=AmanieuMatthias Krüger-4/+9
rustc_target: Add sme-b16b16 as an explicit aarch64 target feature LLVM 20 split out what used to be called b16b16 and correspond to aarch64 FEAT_SVE_B16B16 into sve-b16b16 and sme-b16b16. Add sme-b16b16 as an explicit feature and update the codegen accordingly. Resolves https://github.com/rust-lang/rust/pull/129894.
2024-10-10Rollup merge of #130538 - ultrabear:ultrabear_const_from_ref, r=workingjubileeMatthias Krüger-6/+4
Stabilize const `{slice,array}::from_mut` This PR stabilizes the following APIs as const stable as of rust `1.83`: ```rs // core::array pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1]; // core::slice pub const fn from_mut<T>(s: &mut T) -> &mut [T]; ``` This is made possible by `const_mut_refs` being stabilized (yay). Tracking issue: #90206
2024-10-10Rollup merge of #130308 - davidtwco:tied-target-consolidation, r=wesleywiserMatthias Krüger-163/+175
codegen_ssa: consolidate tied target checks Fixes #105110. Fixes #105111. `rustc_codegen_llvm` and `rustc_codegen_gcc` duplicated logic for checking if tied target features were partially enabled. This PR consolidates these checks into `rustc_codegen_ssa` in the `codegen_fn_attrs` query, which also is run pre-monomorphisation for each function, which ensures that this check is run for unused functions, as would be expected. Also adds a test confirming that enabling one tied feature doesn't imply another - the appropriate error for this was already being emitted. I did a bisect and narrowed it down to two patches it was likely to be - something in #128796, probably #128221 or #128679.
2024-10-10Update .mailmapJulia Ryan-0/+1
2024-10-10Don't fire refinement lint if there are errorsMichael Goulet-0/+4
2024-10-10Clarify implicit captures for RPITITMichael Goulet-11/+30
2024-10-10Add variances to RPITITsMichael Goulet-168/+241