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 8 pull requests #123147

Merged
merged 24 commits into from
Mar 28, 2024
Merged

Rollup of 8 pull requests #123147

merged 24 commits into from
Mar 28, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

joshlf and others added 24 commits March 3, 2024 07:55
The previous definition used the phrase "representation", which is ambiguous given the current state of memory model nomenclature in Rust. The new wording clarifies that size and bit validity are guaranteed to match the corresponding native integer type.
Co-authored-by: Taiki Endo <te316e89@gmail.com>
Co-authored-by: Taiki Endo <te316e89@gmail.com>
Signed-off-by: xiaoxiangxianzi <zhaoyizheng@outlook.com>
Fix drop and drop_in_place by transforming self of drop and
drop_in_place methods into Drop trait objects.
Clarify atomic bit validity

The previous definition used the phrase "representation", which is ambiguous given the current state of memory model nomenclature in Rust. For integer types and for `AtomicPtr<T>`, the new wording clarifies that size and bit validity are guaranteed to match the corresponding native integer type/`*mut T`. For `AtomicBool`, the new wording clarifies that size, alignment, and bit validity are guaranteed to match `bool`.

Note that we use the phrase "size and alignment" rather than "layout" since the latter term also implies that the field types are the same. This isn't true - `AtomicXxx` doesn't store an `xxx`, but rather an `UnsafeCell<xxx>`. This distinction is important for some `unsafe` code, which needs to reason about the presence or absence of interior mutability in order to ensure that their code is sound (see e.g. google/zerocopy#251).
…place, r=compiler-errors

CFI: Fix drop and drop_in_place

Fix drop and drop_in_place by transforming self of drop and drop_in_place methods into a Drop trait objects.

This was split off from rust-lang#116404.

cc `@compiler-errors` `@workingjubilee`
…trochenkov

Delegation: fix ICE on wrong `Self` instantiation

fixes rust-lang#119921
fixes rust-lang#119919

There is no way to instantiate `Self` param for caller in delegation item if

1. callee is a trait method && callee contains `Self` param
2. delegation item isn't an associative item

In general, we can consider `Self` param as independent type param in these cases:

```rust

trait Trait {
    fn foo(_: Option<&Self>) {...}
}

reuse Trait::foo;
// will be desugared to:
fn foo<T: Trait>(x: Option<&T>) { Trait::foo(x) }
```

But this requires early bound parameters support. For now, I suggest banning such cases to avoid ICE's.

r? ``@petrochenkov``
…iler-errors

Load missing type of impl associated constant from trait definition

fixes rust-lang#123092

Also does some cleanups I discovered while analyzing this issue
…sDenton

Some wording improvement

"Data" is usually considered as plural uncountable, therefore "some" seems to make more sense imo.
…pratt

`num::NonZero::get` can be 1 transmute instead of 2

Just something I noticed in passing.  No need for a `match` in here to call `unreachable_unchecked`, as `transmute_unchecked` will add the appropriate `llvm.assume` <https://rust.godbolt.org/z/W5hjeETnc>.
…ng, r=compiler-errors

Let nils know about changes to target docs

i'll probably expand the paths and add a message after rust-lang#121051 but i honestly don't expect that to land very soon lol, so it would be nice to get notified about changes already and watch what's happening there

approve this pr if you're cool
@rustbot rustbot added A-meta Area: Issues about the rust-lang/rust repository. PG-exploit-mitigations Project group: Exploit mitigations 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 27, 2024
@rustbot rustbot added the rollup A PR which is a rollup label Mar 27, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Mar 27, 2024

📌 Commit 145211e 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 Mar 27, 2024
@bors
Copy link
Contributor

bors commented Mar 28, 2024

⌛ Testing commit 145211e with merge d779a7a...

@bors
Copy link
Contributor

bors commented Mar 28, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 28, 2024
@bors bors merged commit d779a7a into rust-lang:master Mar 28, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 28, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#121943 Clarify atomic bit validity 761f19a588636de1902a31492613dcdbc85d9ba0 (link)
#123075 CFI: Fix drop and drop_in_place 7db49d4676a44f93184306dea65743de37e9c157 (link)
#123101 Delegation: fix ICE on wrong Self instantiation 2238acab791aa6c6baa557c86a849ef2b6037741 (link)
#123130 Load missing type of impl associated constant from trait de… b68d740521f8174679b9721dd63465a7dfadd37a (link)
#123133 chore: fix some comments aa1a40d78b3b32da54b027d7e5efdad5462844d7 (link)
#123136 Some wording improvement 38a9c7bd29ff8b006f9aee73236c9a905fe90694 (link)
#123139 num::NonZero::get can be 1 transmute instead of 2 258d26707e60c446811610741db84f6a88913d3b (link)
#123142 Let nils know about changes to target docs c9beccf25a1a2cb9eb1b6dcd77d0e7703157a28e (link)

previous master: 9d70954948

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 (d779a7a): 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)
1.0% [0.8%, 1.2%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.7%, -0.3%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-0.7%, 1.2%] 5

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)
3.4% [0.5%, 6.4%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.4%, -0.0%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [-0.4%, 6.4%] 8

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

Binary size

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)
0.5% [0.1%, 3.0%] 9
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-1.0%, -0.0%] 10
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 3
All ❌✅ (primary) 0.0% [-1.0%, 3.0%] 19

Bootstrap: 670.576s -> 669.547s (-0.15%)
Artifact size: 315.77 MiB -> 315.72 MiB (-0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Mar 28, 2024
@scottmcm
Copy link
Member

Perf queue is empty and I'm curious, so let's see if NonNull really mattered
@rust-timer build 258d267

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (258d267): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

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)
1.1% [1.0%, 1.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.7%, -0.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [-0.7%, 1.3%] 4

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)
1.8% [0.4%, 4.8%] 16
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.4% [-2.7%, -0.0%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [-2.7%, 4.8%] 18

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)
0.8% [0.4%, 1.3%] 2
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.4%, 1.3%] 2

Binary size

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)
0.5% [0.1%, 3.0%] 9
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-1.0%, -0.0%] 10
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 3
All ❌✅ (primary) 0.0% [-1.0%, 3.0%] 19

Bootstrap: 670.576s -> 669.806s (-0.11%)
Artifact size: 315.77 MiB -> 315.65 MiB (-0.04%)

@matthiaskrgr matthiaskrgr deleted the rollup-2t5ot36 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-meta Area: Issues about the rust-lang/rust repository. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.