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 10 pull requests #129359

Merged
merged 27 commits into from
Aug 21, 2024
Merged

Rollup of 10 pull requests #129359

merged 27 commits into from
Aug 21, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

khuey and others added 27 commits August 3, 2024 21:18
…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.
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) O-unix Operating system: Unix-like PG-exploit-mitigations Project group: Exploit mitigations labels Aug 21, 2024
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Aug 21, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Aug 21, 2024

📌 Commit 9fd2832 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 Aug 21, 2024
@bors
Copy link
Contributor

bors commented Aug 21, 2024

⌛ Testing commit 9fd2832 with merge 6b678c5...

@bors
Copy link
Contributor

bors commented Aug 21, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 6b678c5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 21, 2024
@bors bors merged commit 6b678c5 into rust-lang:master Aug 21, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 21, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#128627 Special case DUMMY_SP to emit line 0/column 0 locations on … 5bb9f700bc5d3d1c4c7c3d76f2bd7c3a357533c1 (link)
#128843 Minor Refactor: Remove a Redundant Conditional Check f0490a5e1b31b7666627205cb8174ae846240039 (link)
#129179 CFI: Erase regions when projecting ADT to its transparent n… 76be8b7a8c1c11b7d7313e038a08bdb3f03bba19 (link)
#129281 Tweak unreachable lint wording 8725f6f26064ae674c67dca04a40aa67ae95c145 (link)
#129312 Fix stability attribute of impl !Error for &str 79fceadf3d2b7742faf497d3964389744de1e8c3 (link)
#129332 Avoid extra cast()s after CStr::as_ptr() 2368e5a559109a62610d4ccbf9b7531332f141c3 (link)
#129339 Make ArgAbi::make_indirect_force more specific 273158eca839254cf9d59f81690f9398d44c4cf3 (link)
#129344 Use bool in favor of Option<()> for diagnostics 4e4cf2956fbf07c5c64f38f6897ab1f010787d30 (link)
#129345 Use shorthand field initialization syntax more aggressively… a5cf7bbdca573ddffe3fa257d633cc9c84fb32a5 (link)
#129355 fix comment on PlaceMention semantics 4bf40d03eafe7a24856055b50e055f1081867bbc (link)

previous master: 982c6f8721

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 (6b678c5): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

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
Regressions ❌
(secondary)
0.7% [0.7%, 0.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (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.

mean range count
Regressions ❌
(primary)
1.3% [1.0%, 1.6%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.3% [1.0%, 1.6%] 2

Binary size

Results (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.

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

Bootstrap: 750.879s -> 749.513s (-0.18%)
Artifact size: 338.98 MiB -> 338.91 MiB (-0.02%)

@matthiaskrgr matthiaskrgr deleted the rollup-nyre44t branch September 1, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like PG-exploit-mitigations Project group: Exploit mitigations 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-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.