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 12 pull requests #129915

Merged
merged 25 commits into from
Sep 3, 2024
Merged

Rollup of 12 pull requests #129915

merged 25 commits into from
Sep 3, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 25 commits August 29, 2024 16:06
Signed-off-by: David Wood <david@davidtw.co>
…bilee

Box validity: update for new zero-sized rules

Fixes rust-lang/unsafe-code-guidelines#529

Cc `@joshlf` `@rust-lang/opsem`
…l, r=lcnr

Make decoding non-optional `LazyArray` panic if not set

Tables may be [defined](https://github.com/rust-lang/rust/blob/9649706eada1b2c68cf6504356efb058f68ad739/compiler/rustc_metadata/src/rmeta/mod.rs#L377) as `optional:` or `defaulted:`. If optional, if we try to read a value from a key that was never encoded, we should panic. This has high value in ensuring correctness over a defaulted table, so the tradeoff is worth considering, since it signals the compiler has a buggy encode impl, rather than just defaulting to a value.

HOWEVER, `optional:` arrays were side-stepping this. So this PR fixes that, and makes `optional:` tables of `LazyArray` act like `LazyValue`, and panic if it's not assigned a value during encoding.

During this PR, I found that `deduced_param_attrs` has buggy (?? i think??) implementation where it will refuse to encode cross-crate `deduced_param_attrs` unless we're codegening, we're optimizing the library, and incremental is disabled. This seems incredibly wrong, but I don't want to fix it in this PR.
https://github.com/rust-lang/rust/blob/9649706eada1b2c68cf6504356efb058f68ad739/compiler/rustc_metadata/src/rmeta/encoder.rs#L1733-L1747
compiler_fence documentation: emphasize synchronization, not reordering

Our `fence` docs have at some point been update to explain that they are about synchronization, not about "preventing reordering". This updates the `compiler_fence` docs n the same vein, mostly by referring to the `fence` docs.

The old docs make it sound like I can put a compiler_fence in the middle of a bunch of non-atomic operations and that would achieve any kind of guarantee. It does not, atomic operations are still required to do synchronization.

I also slightly tweaked the `fence` docs, to put the synchronization first and the "prevent reordering" second.

Cc `@rust-lang/opsem` `@chorman0773` `@m-ou-se`

Fixes rust-lang#129189
Fixes rust-lang#54962
Remove kobzol vacation status

Conflicts with rust-lang#129843, so should be merged after it.
…=compiler-errors,jieyouxu

chore: Fix typos in 'compiler' (batch 1)

Batch 1/3: Fixes typos in `compiler`

(See [issue](rust-lang#129874) tracking all PRs with typos fixes)
…=fee1-dead

chore: Fix typos in 'compiler' (batch 2)

Batch 2/3: Fixes typos in `compiler`

(See [issue](rust-lang#129874) tracking all PRs with typos fixes)
…=jieyouxu

chore: Fix typos in 'compiler' (batch 3)

Batch 3/3: Fixes typos in `compiler`

(See [issue](rust-lang#129874) tracking all PRs with typos fixes)
…lfJung

Clarify language around ptrs in slice::raw

More specifically we explicitly mention that the pointer should be non-null as a top level requirement. Nullptrs are always valid for zero sized operations, so just validity (and alignment) does not guarantee non-nullness as implied in the existing docs.

We also explicitly call out ZSTs as an additional example where perhaps unintuitively alignment and non-nullness still have to hold.

Finally we change `data` in the range functions to `start`, which seems like a typo to me.

Touches docs for rust-lang#89792

r? RalfJung
…, r=lqd

mailmap: add new email for davidtwco
mailmapper?

I think I have done this right? lol
…apkin

Fix compile error in solid's remove_dir_all

Before this PR, `x check library/std --target=aarch64-kmc-solid_asp3` will fail with:
```
error[E0382]: use of partially moved value: `result`
   --> std/src/sys/pal/solid/fs.rs:544:20
    |
541 |         if let Err(err) = result
    |                    --- value partially moved here
...
544 |             return result;
    |                    ^^^^^^ value used here after partial move
    |
    = note: partial move occurs because value has type `io::error::Error`, which does not implement the `Copy` trait
help: borrow this binding in the pattern to avoid moving the value
    |
541 |         if let Err(ref err) = result
    |                    +++

```

cc `@kawadakk` I think this will clear up https://solid-rs.github.io/toolstate/ :)
@rustbot rustbot added A-meta Area: Issues about the rust-lang/rust repository. A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) O-solid Operating System: SOLID PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 2, 2024
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Sep 2, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=12

@bors
Copy link
Contributor

bors commented Sep 2, 2024

📌 Commit d6298d3 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 Sep 2, 2024
@bors
Copy link
Contributor

bors commented Sep 2, 2024

⌛ Testing commit d6298d3 with merge 2251572...

@bors
Copy link
Contributor

bors commented Sep 3, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 3, 2024
@bors bors merged commit 2251572 into rust-lang:master Sep 3, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 3, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#129748 Box validity: update for new zero-sized rules 6bcdd3d80b511361958fe558f07c15cbfff8c601 (link)
#129829 Make decoding non-optional LazyArray panic if not set 3ae67835992f4f0b864c60c7421a1eac98a52d95 (link)
#129856 compiler_fence documentation: emphasize synchronization, no… b440a8af3ffb708c6cd9314e32ae7b92835a9e6a (link)
#129868 Remove kobzol vacation status f6904c96fb9e89a304b4bfbb29390ccf467ea983 (link)
#129875 chore: Fix typos in 'compiler' (batch 1) c884178afd23e01a59d2a7582676dab9e28f567b (link)
#129877 chore: Fix typos in 'compiler' (batch 2) 91fddeb15aa955e7e42309281dc9a96207f9157b (link)
#129878 chore: Fix typos in 'compiler' (batch 3) 0187e221d737a347fbf162e8ba24b436fe11525f (link)
#129890 Remove stray word in a comment c0d586e8db81dbce83bb866d53a196fa12b0968b (link)
#129892 Clarify language around ptrs in slice::raw 066347d38da097156f4e1142fb4acae125051a15 (link)
#129905 mailmap: add new email for davidtwco b6c831e2c17bd9c3f58000f3f2028e7859d1413f (link)
#129906 mailmapper? a0716b82be3ccf81eceaaf6a6aba4d37e8210d8e (link)
#129907 Fix compile error in solid's remove_dir_all 3e5286a617a9a4ee43bf207e832dfa374fe6944a (link)

previous master: bd53aa3bf7

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

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (secondary 2.2%)

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)
2.2% [0.9%, 3.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 3.8%)

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

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

Bootstrap: 750.044s -> 749.903s (-0.02%)
Artifact size: 338.29 MiB -> 338.37 MiB (0.02%)

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. 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-solid Operating System: SOLID 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.