-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 7 pull requests #131502
Rollup of 7 pull requests #131502
Commits on Sep 24, 2024
-
tests: add test for rust-lang#105111
Enabling a tied feature should not enable the other feature automatically. This was fixed by something in rust-lang#128796, probably rust-lang#128221 or rust-lang#128679.
Configuration menu - View commit details
-
Copy full SHA for 6edd86d - Browse repository at this point
Copy the full SHA 6edd86dView commit details -
codegen_ssa: consolidate tied feature checking
`rustc_codegen_llvm` and `rustc_codegen_gcc` duplicated logic for checking if tied target features were partially enabled. This commit 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.
Configuration menu - View commit details
-
Copy full SHA for 207bc77 - Browse repository at this point
Copy the full SHA 207bc77View commit details
Commits on Oct 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7b3f161 - Browse repository at this point
Copy the full SHA 7b3f161View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4bf471 - Browse repository at this point
Copy the full SHA e4bf471View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2659ef - Browse repository at this point
Copy the full SHA f2659efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 960ba89 - Browse repository at this point
Copy the full SHA 960ba89View commit details
Commits on Oct 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for becf664 - Browse repository at this point
Copy the full SHA becf664View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62b24ea - Browse repository at this point
Copy the full SHA 62b24eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e7a52b - Browse repository at this point
Copy the full SHA 2e7a52bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20cebae - Browse repository at this point
Copy the full SHA 20cebaeView commit details
Commits on Oct 10, 2024
-
Auto merge of rust-lang#13464 - y21:issue13458, r=flip1995
Don't warn on proc macro generated code in `needless_return` Fixes rust-lang#13458 Fixes rust-lang#13457 Fixes rust-lang#13467 Fixes rust-lang#13479 Fixes rust-lang#13481 Fixes rust-lang#13526 Fixes rust-lang#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
Configuration menu - View commit details
-
Copy full SHA for a21a9fe - Browse repository at this point
Copy the full SHA a21a9feView commit details -
Configuration menu - View commit details
-
Copy full SHA for b12dc20 - Browse repository at this point
Copy the full SHA b12dc20View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1edff46 - Browse repository at this point
Copy the full SHA 1edff46View commit details -
Rollup merge of rust-lang#130308 - davidtwco:tied-target-consolidatio…
…n, r=wesleywiser codegen_ssa: consolidate tied target checks Fixes rust-lang#105110. Fixes rust-lang#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 rust-lang#128796, probably rust-lang#128221 or rust-lang#128679.
Configuration menu - View commit details
-
Copy full SHA for b38afa0 - Browse repository at this point
Copy the full SHA b38afa0View commit details -
Rollup merge of rust-lang#131033 - compiler-errors:precise-capturing-…
…in-traits, 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: * rust-lang#130044
Configuration menu - View commit details
-
Copy full SHA for 6d32a03 - Browse repository at this point
Copy the full SHA 6d32a03View commit details -
Rollup merge of rust-lang#131442 - jieyouxu:mir-opt-rebuild, r=onur-o…
…zkan 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 rust-lang#131437 (comment). Fixes rust-lang#131437.
Configuration menu - View commit details
-
Copy full SHA for b57de4b - Browse repository at this point
Copy the full SHA b57de4bView commit details -
Rollup merge of rust-lang#131470 - EnzymeAD:enzyme-testinfra2, r=jiey…
…ouxu 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: - rust-lang#124509
Configuration menu - View commit details
-
Copy full SHA for f9e59e8 - Browse repository at this point
Copy the full SHA f9e59e8View commit details -
Rollup merge of rust-lang#131475 - fmease:compiler-mv-obj-safe-dyn-co…
…mpat-2, r=jieyouxu Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible" Follow-up to rust-lang#130826. Part of rust-lang#130852. 1. 1st commit: Fix stupid oversights. Should've been part of rust-lang#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).
Configuration menu - View commit details
-
Copy full SHA for 33053d3 - Browse repository at this point
Copy the full SHA 33053d3View commit details -
Rollup merge of rust-lang#131492 - flip1995:clippy-master-backport, r…
…=matthiaskrgr Clippy: Backport `needless_return` fix r? ``@Manishearth`` This cherry-picks rust-lang/rust-clippy#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.
Configuration menu - View commit details
-
Copy full SHA for efb10c7 - Browse repository at this point
Copy the full SHA efb10c7View commit details -
Rollup merge of rust-lang#131493 - madsmtm:avoid-redundant-linker-pat…
…h, r=jieyouxu 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
Configuration menu - View commit details
-
Copy full SHA for 2be866c - Browse repository at this point
Copy the full SHA 2be866cView commit details