-
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 10 pull requests #129359
Rollup of 10 pull requests #129359
Conversation
…forms. Line 0 has a special meaning in DWARF. From the version 5 spec: The compiler may emit the value 0 in cases where an instruction cannot be attributed to any source line. DUMMY_SP spans cannot be attributed to any line. However, because rustc internally stores line numbers starting at zero, lookup_debug_loc() adjusts every line number by one. Special casing DUMMY_SP to actually emit line 0 ensures rustc communicates to the debugger that there's no meaningful source code for this instruction, rather than telling the debugger to jump to line 1 randomly.
The existing code check for `where_bounds.is_empty()` twice when it can be combined into one. Moreover, the refactored code reads better and feels straightforward.
These used to be `&str` literals that did need a pointer cast, but that became a no-op after switching to `c""` literals in rust-lang#118566.
It was introduced in bf7611d (rust-lang#99917), which was included in Rust 1.65.0.
Special case DUMMY_SP to emit line 0/column 0 locations on DWARF platforms. Line 0 has a special meaning in DWARF. From the version 5 spec: The compiler may emit the value 0 in cases where an instruction cannot be attributed to any source line. DUMMY_SP spans cannot be attributed to any line. However, because rustc internally stores line numbers starting at zero, lookup_debug_loc() adjusts every line number by one. Special casing DUMMY_SP to actually emit line 0 ensures rustc communicates to the debugger that there's no meaningful source code for this instruction, rather than telling the debugger to jump to line 1 randomly.
…avidtwco Minor Refactor: Remove a Redundant Conditional Check The existing code checks `where_bounds.is_empty()` twice when it can be combined into one. Now, after combining, the refactored code reads better and feels straightforward. The diff doesn't make it clear. So, the current code looks like this: ``` rust if !where_bounds.is_empty() { err.help(format!( "consider introducing a new type parameter `T` and adding `where` constraints:\ \n where\n T: {qself_str},\n{}", where_bounds.join(",\n"), )); } let reported = err.emit(); if !where_bounds.is_empty() { return Err(reported); } ``` The proposed changes: ``` rust if !where_bounds.is_empty() { err.help(format!( "consider introducing a new type parameter `T` and adding `where` constraints:\ \n where\n T: {qself_str},\n{}", where_bounds.join(",\n"), )); let reported = err.emit(); return Err(reported); } err.emit(); ```
…ent, r=davidtwco CFI: Erase regions when projecting ADT to its transparent non-1zst field The output from `FieldDef::ty` (or `TyCtxt::type_of`) may have free regions (well, `'static`) -- erase it. Fixes rust-lang#129169 Fixes rust-lang#123685
…ording, r=estebank Tweak unreachable lint wording Some tweaks to the notes added in rust-lang#128034. r? `@estebank`
…trieb Fix stability attribute of `impl !Error for &str` It was introduced in bf7611d (rust-lang#99917), which was included in Rust 1.65.0.
Avoid extra `cast()`s after `CStr::as_ptr()` These used to be `&str` literals that did need a pointer cast, but that became a no-op after switching to `c""` literals in rust-lang#118566.
…, r=RalfJung Make `ArgAbi::make_indirect_force` more specific As the method is only needed for making ignored ZSTs indirect on some ABIs, rename and add a doc-comment and `self.mode` check to make it harder to accidentally misuse. Addresses review feedback from rust-lang#125854 (comment). r? ``@RalfJung``
…iagnostics, r=jieyouxu Use `bool` in favor of `Option<()>` for diagnostics We originally only supported `Option<()>` for optional notes/labels, but we now support `bool`. Let's use that, since it usually leads to more readable code. I'm not removing the support from the derive macro, though I guess we could error on it... 🤔
Use shorthand field initialization syntax more aggressively in the compiler Caught these when cleaning up rust-lang#129344 and decided to run clippy to find the rest
…errors fix comment on PlaceMention semantics It seems this was simply missed in rust-lang#114330.
@bors r+ rollup=never p=10 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 982c6f8721 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (6b678c5): comparison URL. Overall result: ❌ regressions - no action needed@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)This benchmark run did not return any relevant results for this metric. CyclesResults (primary 1.3%)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.
Binary sizeResults (secondary 0.1%)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.
Bootstrap: 750.879s -> 749.513s (-0.18%) |
Successful merges:
impl !Error for &str
#129312 (Fix stability attribute ofimpl !Error for &str
)cast()
s afterCStr::as_ptr()
#129332 (Avoid extracast()
s afterCStr::as_ptr()
)ArgAbi::make_indirect_force
more specific #129339 (MakeArgAbi::make_indirect_force
more specific)bool
in favor ofOption<()>
for diagnostics #129344 (Usebool
in favor ofOption<()>
for diagnostics)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup