Skip to content
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 #112253

Merged
merged 18 commits into from
Jun 3, 2023
Merged

Rollup of 7 pull requests #112253

merged 18 commits into from
Jun 3, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

y21 and others added 18 commits May 16, 2023 22:14
Moving this from rust-lang/libs-team#59
where an API addition was rejected.  But I think it's valuable
to add this example to the documentation at least.
When compiling with panic=abort (or using a target that doesn't have
unwinding support), the compiler adds the "nounwind" attribute to
functions. This results in a different LLVM IR, which results in a #NNN
added after the function name:

    tail call void @bar() rust-lang#13, !dbg !467
    attributes rust-lang#13 = { nounwind }

...instead of:

    tail call void @bar(), !dbg !467

This commit changes the matchers to swallow the #NNN, as it's not needed
for these specific tests.
The attribute is injected into most items when static relocation is
enabled in a target.
The attribute is not emitted on targets without unwinding tables.
…son`

This makes go-to-definition, etc. work in cg_clif, cg_gcc, rust-analyzer, and src/tools/x.
suggest `Option::as_deref(_mut)` on type mismatch in option combinator if it passes typeck

Fixes rust-lang#106342.
This adds a suggestion to call `.as_deref()` (or `.as_deref_mut()` resp.) if typeck fails due to a type mismatch in the function passed to an `Option` combinator such as `.map()` or `.and_then()`.
For example:
```rs
fn foo(_: &str) {}
Some(String::new()).map(foo);
```
The `.map()` method requires its argument to satisfy `F: FnOnce(String)`, but it received `fn(&str)`, which won't pass. However, placing a `.as_deref()` before the `.map()` call fixes this since `&str == &<String as Deref>::Target`
…result, r=Mark-Simulacrum

Option::map_or_else: Show an example of integrating with Result

Moving this from rust-lang/libs-team#59 where an API addition was rejected.  But I think it's valuable to add this example to the documentation at least.
…-Simulacrum

Fix codegen test suite for bare-metal-like targets

For Ferrocene I needed to run the test suite for custom target with no unwinding and static relocation. Running the tests uncovered ~20 failures due to the test suite not accounting for these options. This PR fixes them by:

* Fixing `CHECK`s to account for functions having extra LLVM IR attributes (in this case `nounwind`).
* Fixing `CHECK`s to account for the `dso_local` LLVM IR modifier, which is [added to every item when relocation is static](https://github.com/rust-lang/rust/blob/f3d597b31c0f101a02c230798afa31a36bdacbc6/compiler/rustc_codegen_llvm/src/mono_item.rs#L139-L142).
* Fixing `CHECK`s to account for missing `uwtables` attributes.
* Added the `needs-unwind` attributes for tests that are designed to check unwinding.

There is no part of Rust CI that checks this unfortunately, and testing whether the PR works locally is kinda hard because you need a target with std enabled but no unwinding and static relocations. Still, this works in my local testing, and if future PRs accidentally break this Ferrocene will take care of sending followup PRs.
…mulacrum

bootstrap: Make `clean` respect `dry-run`

I noticed `clean_default` was getting run twice as the `DryRun::SelfCheck` flag is ignored
…acrum

Add other workspaces to `linkedProjects` in rust_analyzer_settings

This makes go-to-definition, etc. work in cg_clif, cg_gcc, rust-analyzer, and src/tools/x.
…, r=cjgillot

only suppress coercion error if type is definitely unsized

we previously suppressed coercion errors when the return type was `dyn Trait` because we expect a far more descriptive `Sized` trait error to be emitted instead, however the code that does this suppression does not consider where-clause predicates since it just looked at the HIR. let's do that instead by creating an obligation and checking if it may hold.

fixes rust-lang#110683
fixes rust-lang#112208
…on-issue, r=jyn514

Make sure the build.rustc version is either the same or 1 apart (revised)

rust-lang#111538 is reverted in rust-lang#112023.

This PR will only check `build.rustc` to confirm the correct version.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 3, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Jun 3, 2023

📌 Commit d4f87d1 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2023
@bors
Copy link
Contributor

bors commented Jun 3, 2023

⌛ Testing commit d4f87d1 with merge 398fa21...

@bors
Copy link
Contributor

bors commented Jun 3, 2023

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 398fa21 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 3, 2023
@bors bors merged commit 398fa21 into rust-lang:master Jun 3, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 3, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#112231 ff1efe81c7de098c81c030394e621378dc66a7b0
#112215 06f58b45034fe028615eb3b70c2b1b3a77256e34
#111998 7b96416f6802561cae48097283900e116df4254c
#111969 ccf03fe1646b94f06dcb78f93b109f63aad95eaa
#111878 6c991f6b34ab0a5063925632fb3e5b2c9b1d9b7a
#111702 d28f112838d6fe7950def775f60a65a030e7b2a3
#111659 05122a371b4ed9a3fd9f9196f9ba6c05ac9b7cbf

previous master: 2f5e6bb817

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (398fa21): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.5% [0.4%, 0.6%] 6
Regressions ❌
(secondary)
0.9% [0.4%, 1.3%] 9
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.2%] 4
All ❌✅ (primary) 0.4% [-0.4%, 0.6%] 7

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.8% [3.1%, 4.5%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.8% [3.1%, 4.5%] 6

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 647.253s -> 647.149s (-0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Jun 3, 2023
@Mark-Simulacrum Mark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Jun 6, 2023
@matthiaskrgr matthiaskrgr deleted the rollup-c37jpm5 branch March 16, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.