-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 14 pull requests #79200
Rollup of 14 pull requests #79200
Conversation
…e checking, and associated UI tests
Now users will be able to do: ``` cargo build -Zbuild-std=core -Zbuild-std-features=compiler-builtins-asm ``` and correctly get the assembly implemenations for `memcpy` and friends.
On macOS the test is flaky and sometimes fails, sometimes succeeds on CI.
…ith qualifiers inside an `extern "C"` block
This allows us to: - Handle precise Places captured by a closure directly in MIR. Handling captures in MIR is easier since we can rely on/ tweak PlaceBuilder to generate `mir::Place`s that resemble how we store captures (`hir::Place`). - Allows us to handle `let _ = x` case when feature `capture_disjoint_fields` is enabled directly in MIR. This is required to be done in MIR since patterns are desugared in MIR.
ExprKind::SelfRef was used to express accessing `self` in the desugared Closure/Generator struct when lowering captures in THIR. Since we handle captures in MIR now, we don't need `ExprKind::Self`.
Previously, bootstrap.py would attempt to find the LLVM commit from `src/llvm-project`. However, it assumed it was always being run from the top-level directory, which isn't always the case. Before: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz curl: (22) The requested URL returned error: 404 failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmppyh4w8 https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz Build completed unsuccessfully in 0:00:02 ``` After: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/430feb24a46993e5073c1bb1b39da190d83fa2bf/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz ###################################################################################################################################################################### 100.0% extracting /home/joshua/rustc/src/bootstrap/build/cache/llvm-430feb24a46993e5073c1bb1b39da190d83fa2bf-False/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz ```
…pt level flag to test
Make bad "rust-call" arguments no longer ICE The simplest of bad rust-call definitions will no longer cause an ICE. There is a FIXME added for future work, as I wanted to get this easy fix in before trying to either add a hack or mess with the whole obligation system fixes rust-lang#22565
…stebank Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block. This mitigates rust-lang#78941. As suggested by ```@estebank,``` `span_suggestion` was replaced with `span_suggestion_verbose` for this specific diagnostic.
libary: Forward compiler-builtins "asm" and "mangled-names" feature In principle this is a followup of rust-lang#78472. In the previous PR was the support of the test crate missing. Now users will be able to do: ``` cargo build -Zbuild-std=core -Zbuild-std-features=compiler-builtins-asm ``` and correctly get the assembly implemenations for `memcpy` and friends.
Add //ignore-macos to pretty-std-collections.rs On macOS the test is flaky and sometimes fails, sometimes succeeds on CI. This is no fix for the underlying issue, but I feel the workaround is worth it as the issue makes it harder to get things merged into master. cc rust-lang#78665
…hievink Don't special case constant operands when lowering intrinsics
…ark-Simulacrum Add two regression tests For rust-lang#78721 and rust-lang#78722
Remove redundant notes in E0275 Fix rust-lang#58964.
…crum compiletest: Fix a warning in debuginfo tests on windows-gnu The warning looked like this for me: ``` Warning: C:msys64homewerust./src/etc: No such file or directory. ``` It didn't affect actual testing because we don't currently emit gdb pretty-printer information into executables on windows-gnu.
add optimization fuel checks to some mir passes Fixes rust-lang#77402 Inserts a bunch of calls to `consider_optimizing`. Note that `consider_optimizing` is the method that actually decrements the fuel count, so the point at which it's called is when the optimization takes place, from a fuel perspective. This means that where we call it has some thought behind it: 1. We probably don't want to decrement the fuel count before other simple checks, otherwise we count an optimization as being performed even if nothing was mutated (ie. it returned early). 2. In cases like `InstCombine`, where we gather optimizations in a pass and then mutate values, we probably would rather skip the gathering pass for performance reasons rather than skip the mutations afterwards.
Highlight MIR as Rust on GitHub
Move capture lowering from THIR to MIR This allows us to: - Handle precise Places captured by a closure directly in MIR. Handling captures in MIR is easier since we can rely on/ tweak PlaceBuilder to generate `mir::Place`s that resemble how we store captures (`hir::Place`). - Handle `let _ = x` case when feature `capture_disjoint_fields` is enabled directly in MIR. This is required to be done in MIR since patterns are desugared in MIR. Closes: rust-lang/project-rfc-2229#25 r? ```@nikomatsakis```
…k-Simulacrum fix handling the default config for profiler and sanitizers rust-lang#78354 don't handle the case that user don't add any target-specific config in `[target.*]` of `config.toml`: ```toml changelog-seen = 2 [llvm] link-shared = true [build] sanitizers = true profiler = true [install] [rust] [dist] ``` The previes code handle the default config in `Config::prase()`: ```rust target.sanitizers = cfg.sanitizers.unwrap_or(build.sanitizers.unwrap_or_default()); target.profiler = cfg.profiler.unwrap_or(build.profiler.unwrap_or_default()); config.target_config.insert(TargetSelection::from_user(&triple), target); ``` In this case, `toml.target` don't contain any target, so the above code won't execute. Instead, a default `Target` is insert in https://github.com/rust-lang/rust/blob/c919f490bbcd2b29b74016101f7ec71aaa24bdbb/src/bootstrap/sanity.rs#L162-L166 The default value for `bool` is false, hence the issue in rust-lang#79124 This fix change the type of `sanitizers` and `profiler` to `Option<bool>`, so the default value is `None`, and fallback config is handled in `Config::sanitizers_enabled` and `Config::profiler_enabled` fix rust-lang#79124 cc `@Mark-Simulacrum` `@richkadel`
…crum Allow using `download-ci-llvm` from directories other than the root Previously, bootstrap.py would attempt to find the LLVM commit from `src/llvm-project`. However, it assumed it was always being run from the top-level directory, which isn't always the case. Before: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz curl: (22) The requested URL returned error: 404 failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmppyh4w8 https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz Build completed unsuccessfully in 0:00:02 ``` After: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/430feb24a46993e5073c1bb1b39da190d83fa2bf/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz ###################################################################################################################################################################### 100.0% extracting /home/joshua/rustc/src/bootstrap/build/cache/llvm-430feb24a46993e5073c1bb1b39da190d83fa2bf-False/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz ``` r? ```@Mark-Simulacrum``` cc ```@pnkfelix```
…t-arguments, r=petrochenkov Permit standalone generic parameters as const generic arguments in macros Fixes rust-lang#79127. r? ```@petrochenkov```
@bors r+ p=5 rollup=never |
📌 Commit b5fffdc has been approved by |
☀️ Test successful - checks-actions |
This was a moderate improvement in instruction counts (up to -1.9% on cc @tmiasko @arora-aman - congratulations, but please remember to mark PRs as |
Successful merges:
fn
contains qualifiers inside anextern
block. #79082 (Improve the diagnostic for when anfn
contains qualifiers inside anextern
block.)download-ci-llvm
from directories other than the root #79156 (Allow usingdownload-ci-llvm
from directories other than the root)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup