-
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 7 pull requests #112253
Rollup of 7 pull requests #112253
Conversation
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.
@bors r+ rollup=never p=7 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 2f5e6bb817 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (398fa21): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 647.253s -> 647.149s (-0.02%) |
Successful merges:
Option::as_deref(_mut)
on type mismatch in option combinator if it passes typeck #111659 (suggestOption::as_deref(_mut)
on type mismatch in option combinator if it passes typeck)clean
respectdry-run
#111969 (bootstrap: Makeclean
respectdry-run
)linkedProjects
in rust_analyzer_settings #111998 (Add other workspaces tolinkedProjects
in rust_analyzer_settings)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup