about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
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-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-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-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
2024-10-10Add gate for precise capturing in traitsMichael Goulet-5/+54
2024-10-10Auto merge of #131492 - flip1995:clippy-master-backport, r=matthiaskrgrbors-111/+154
Clippy: Backport `needless_return` fix r? `@Manishearth` This cherry-picks https://github.com/rust-lang/rust-clippy/pull/13464, so that it gets into master and with that into `beta` tomorrow, so that the bug in this lint doesn't hit `beta`. Changes look quite big, but most of them are whitespace changes because of the introduction of an `_inner` function. In reality it only adds 2 checks.
2024-10-10Auto merge of #131263 - compiler-errors:solver-relating, r=lcnrbors-517/+911
Introduce SolverRelating type relation to the new solver Redux of #128744. Splits out relate for the new solver so that implementors don't need to implement it themselves. r? lcnr
2024-10-10Auto merge of #131495 - matthiaskrgr:rollup-lwf2u4i, r=matthiaskrgrbors-87/+171
Rollup of 7 pull requests Successful merges: - #130625 (Fix a few relative paths in rustc doc) - #131397 (fix/update teach_note from 'escaping mutable ref/ptr' const-check) - #131479 (Apple: Avoid redundant `-Wl,-dylib` flag when linking) - #131480 (Fix hardcoded strip path when cross-compiling from Linux to Darwin) - #131482 (structurally resolve adts and tuples expectations too) - #131484 (Add myself back to review rotation) - #131491 (impossible obligations fast path) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-10Rollup merge of #131491 - lcnr:nalgebra-perrrrf, r=compiler-errorsMatthias Krüger-45/+90
impossible obligations fast path fixes the remaining performance regression in nalgebra for #130654 r? `@compiler-errors` Fixes #124894
2024-10-10Rollup merge of #131484 - jhpratt:review-rotation, r=jieyouxuMatthias Krüger-1/+0
Add myself back to review rotation
2024-10-10Rollup merge of #131482 - compiler-errors:struct-res, r=lcnrMatthias Krüger-2/+34
structurally resolve adts and tuples expectations too r? lcnr
2024-10-10Rollup merge of #131480 - madsmtm:macos-fix-strip-binary, r=nnethercoteMatthias Krüger-1/+3
Fix hardcoded strip path when cross-compiling from Linux to Darwin Fixes https://github.com/rust-lang/rust/issues/131206. I fear that https://github.com/rust-lang/rust/pull/131405 might end up taking some time, so opening this PR to resolve the regression. `@rustbot` label O-apple
2024-10-10Rollup merge of #131479 - madsmtm:avoid-redundant-dylib, r=jieyouxuMatthias Krüger-3/+5
Apple: Avoid redundant `-Wl,-dylib` flag when linking Seems to have been introduced all the way back in https://github.com/rust-lang/rust/commit/e338a4154b134fc1d4628496d4ccf85b7af7c443, but should be redundant, `-dynamiclib` should already make `cc` set `-dylib` when linking. Spotted this while trying to get `-Clinker-flavor=gcc` and `-Clinker-flavor=ld` closer together, not that important to fix. `@rustbot` label O-apple
2024-10-10Rollup merge of #131397 - RalfJung:const-escaping-ref-teach, r=chenyukangMatthias Krüger-35/+37
fix/update teach_note from 'escaping mutable ref/ptr' const-check The old note was quite confusing since it talked about statics, but the message is also shown for consts. So let's reword to something that is true for both of them.
2024-10-10Rollup merge of #130625 - heiseish:issue-124028-fix, r=jieyouxuMatthias Krüger-0/+2
Fix a few relative paths in rustc doc ## Changes - Don't inline the doc for re-exporting some structs that have relative paths in doc. ## Context See #124028. - Most of the relative links in rustdoc are there because of circular import (so syntax like `[MyType]: rustc_foo::bar` is difficult to achieve when we cannot import `rustc_xxx` due to circular import) - Here, I disable new links for re-exports. I think it's fine for re-exported items in `hir::*`. - There is a few more relative links in other `rustc` crates, however they are not addressed in this PR, as they are not re-exported and/so the relative paths are working. Closes #124028. r​? `@fmease` Let me know if I miss anything or there's any other way to address this issue.
2024-10-10rustc_target: Add sme-b16b16 as an explicit aarch64 target featureKajetan Puchalski-4/+9
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.
2024-10-10stdarch: Bump stdarch submoduleKajetan Puchalski-0/+0
2024-10-10impossible obligations check fast pathlcnr-45/+90
2024-10-10Make super combine into fnsMichael Goulet-202/+193
2024-10-10Use SolverRelating in favor of TypeRelating in the old solver where possibleMichael Goulet-39/+92
2024-10-10Remove unnecessary StructurallyRelateAliases from CombineFields/TypeRelatingMichael Goulet-8/+2
2024-10-10Use SolverRelating in new solverMichael Goulet-97/+68
2024-10-10Introduce SolverRelatingMichael Goulet-4/+387
2024-10-10Uplift super_combineMichael Goulet-305/+376
2024-10-10Move ty::Error branch into super_combine_tysMichael Goulet-81/+12
2024-10-10Avoid redundant additions to PATH when linkingMads Marquart-0/+2
2024-10-10add config to explicitely test rustc with autodiff/enzyme disabledManuel Drehwald-0/+7
2024-10-10Auto merge of #13464 - y21:issue13458, r=flip1995bors-111/+154
Don't warn on proc macro generated code in `needless_return` Fixes #13458 Fixes #13457 Fixes #13467 Fixes #13479 Fixes #13481 Fixes #13526 Fixes #13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
2024-10-10Auto merge of #131453 - onur-ozkan:llvm-ci-check-for-rustc-ci, r=Kobzolbors-0/+14
disable `download-rustc` if LLVM submodule has changes in CI We can't use CI rustc while using in-tree LLVM (which happens in LLVM submodule update PRs) and this PR handles that by ignoring CI-rustc in CI and failing in non-CI environments.
2024-10-10update `rustc_borrowck::places_conflict` doc-commentonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10stabilize `ci_rustc_if_unchanged_logic` testonur-ozkan-28/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10stabilize `download_ci_llvm` testonur-ozkan-22/+14
Signed-off-by: onur-ozkan <work@onurozkan.dev>