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 #128278

Merged
merged 23 commits into from
Jul 27, 2024
Merged

Rollup of 8 pull requests #128278

merged 23 commits into from
Jul 27, 2024

Conversation

tgross35
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 23 commits June 2, 2024 16:43
Both these platforms have MSG_NOSIGNAL available, and we should set it for
socket writes in the event that the SIGPIPE handler has been reset to SIG_DFL
(i.e. terminate the process).

I've verified via a quick program at
https://github.com/sunshowers/msg-nosignal-test/ that even when the SIGPIPE
handler is reset to SIG_DFL, writes to closed sockets now error out with EPIPE.
(Under ordinary circumstances UDP writes won't cause MSG_NOSIGNAL.)
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Jump threading stores values as `u128` (`ScalarInt`) and does its
comparisons for equality as integer comparisons.
This works great for integers. Sadly, not everything is an integer.

Floats famously have wonky equality semantcs, with `NaN!=NaN` and
`0.0 == -0.0`. This does not match our beautiful integer bitpattern
equality and therefore causes things to go horribly wrong.

While jump threading could be extended to support floats by remembering
that they're floats in the value state and handling them properly,
it's signficantly easier to just disable it for now.
from_ref, from_mut: clarify documentation

This was brought up [here](rust-lang#56604 (comment)). The domain of quantification is generally always constrained by the type in the type signature, and I am not sure it's always worth spelling that out explicitly as that makes things exceedingly verbose. But since this was explicitly brought up, let's clarify.
…r=Amanieu

improve error message when `global_asm!` uses `asm!` options

specifically, what was

    error: expected one of `)`, `att_syntax`, or `raw`, found `preserves_flags`
      --> $DIR/bad-options.rs:45:25
       |
    LL | global_asm!("", options(preserves_flags));
       |                         ^^^^^^^^^^^^^^^ expected one of `)`, `att_syntax`, or `raw`

is now

    error: the `preserves_flags` option cannot be used with `global_asm!`
      --> $DIR/bad-options.rs:45:25
       |
    LL | global_asm!("", options(preserves_flags));
       |                         ^^^^^^^^^^^^^^^ the `preserves_flags` option is not meaningful for global-scoped inline assembly

mirroring the phrasing of the [reference](https://doc.rust-lang.org/reference/inline-assembly.html#options).

This is also a bit of a refactor for a future `naked_asm!` macro (for use in `#[naked]` functions). Currently this sort of error can come up when switching from inline to global asm, or when a user just isn't that experienced with assembly. With  `naked_asm!` added to the mix hitting this error is more likely.
…ouxu

Remove logic to suggest clone of function output

I can't exactly tell, but I believe that this suggestion is operating off of a heuristic that the lifetime of a function's input is correlated with the lifetime of a function's output in such a way that cloning would fix an error. I don't think that actually manages to hit the bar of "actually provides useful suggestions" most of the time.

Specifically, I've hit false-positives due to this suggestion *twice* when fixing ICEs in the compiler, so I don't think it's worthwhile having this logic around. Neither of the two affected UI tests are actually fixed by the suggestion.
…mulacrum

[illumos/solaris] set MSG_NOSIGNAL while writing to sockets

Both these platforms have MSG_NOSIGNAL available, and we should set it for socket writes in the event that the SIGPIPE handler has been reset to SIG_DFL (i.e. terminate the process).

I've verified via a quick program at
https://github.com/sunshowers/msg-nosignal-test/ that even when the SIGPIPE handler is reset to SIG_DFL, writes to closed TCP sockets now error out with EPIPE. (Under ordinary circumstances UDP writes won't cause MSG_NOSIGNAL.)

However, I couldn't find any existing tests which verified the MSG_NOSIGNAL behavior.
…hlin

Delete `SimplifyArmIdentity` and `SimplifyBranchSame` tests

These two passes have already been deleted in rust-lang#107256. I'm not sure why tidy didn't catch it.

As regression tests, I didn't delete `tests/ui/mir/issue-66851.rs` and `tests/ui/mir/simplify-branch-same.rs`.

r? compiler
…tolnay

update `rust.channel` default value documentation

self-explanatory

Resolves rust-lang#128258

r? dtolnay
…otriddle

Add rustdoc GUI test to check title with and without search

Follow-up of rust-lang#128210.

r? `@notriddle`
…-called-float-equality, r=compiler-errors

Disable jump threading of float equality

Jump threading stores values as `u128` (`ScalarInt`) and does its comparisons for equality as integer comparisons.
This works great for integers. Sadly, not everything is an integer.

Floats famously have wonky equality semantcs, with `NaN!=NaN` and `0.0 == -0.0`. This does not match our beautiful integer bitpattern equality and therefore causes things to go horribly wrong.

While jump threading could be extended to support floats by remembering that they're floats in the value state and handling them properly, it's signficantly easier to just disable it for now.

fixes rust-lang#128243
@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. rollup A PR which is a rollup labels Jul 27, 2024
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 27, 2024

📌 Commit f62ae7e has been approved by tgross35

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 Jul 27, 2024
@bors
Copy link
Contributor

bors commented Jul 27, 2024

⌛ Testing commit f62ae7e with merge fbccf50...

@bors
Copy link
Contributor

bors commented Jul 27, 2024

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing fbccf50 to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#125897 from_ref, from_mut: clarify documentation a2b3f2fb169e1bc1455043c21568c6c359640b0b (link)
#128207 improve error message when global_asm! uses asm! options cf295a1a93f16334939c2ae2eaedd8246c45db13 (link)
#128241 Remove logic to suggest clone of function output 10d78e74c9a9b646ea5e83990fffd36f83a0c395 (link)
#128259 [illumos/solaris] set MSG_NOSIGNAL while writing to sockets fa210b4a320d378c02589c6a8f5999f21b3044be (link)
#128262 Delete SimplifyArmIdentity and SimplifyBranchSame tests f728d2bcab555ab1fee9d7c490585ba2324849cf (link)
#128266 update rust.channel default value documentation 99203e4e679d633d7b50fa8bde2aa99eb66e08bf (link)
#128267 Add rustdoc GUI test to check title with and without search 0d7bbb0bd158e7605cccef555e58e87eec31e6d0 (link)
#128271 Disable jump threading of float equality aa7dfffc57546e22f0e0483f01cf2d757a5dbc2d (link)

previous master: d9e1dea75e

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 (fbccf50): 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 (primary 2.4%)

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

Cycles

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

Binary size

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

Bootstrap: 770.643s -> 770.462s (-0.02%)
Artifact size: 329.01 MiB -> 329.00 MiB (-0.00%)

@tgross35 tgross35 deleted the rollup-zv7q0h5 branch July 27, 2024 23:15
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  PR_MESSAGE: Automation to keep dependencies in `Cargo.lock` current.
following is the output from `cargo update`:
  COMMIT_MESSAGE: cargo update 
##[endgroup]
info: syncing channel updates for 'beta-2024-06-11-x86_64-unknown-linux-gnu'
info: latest update on 2024-06-11, rust version 1.80.0-beta.1 (75ac3b633 2024-06-10)
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
info: installing component 'rust-std'
info: installing component 'rustc'

  beta-2024-06-11-x86_64-unknown-linux-gnu installed - rustc 1.80.0-beta.1 (75ac3b633 2024-06-10)

info: using existing install for 'beta-2024-06-11-x86_64-unknown-linux-gnu'
info: default toolchain set to 'beta-2024-06-11-x86_64-unknown-linux-gnu'

  beta-2024-06-11-x86_64-unknown-linux-gnu unchanged - rustc 1.80.0-beta.1 (75ac3b633 2024-06-10)

##[group]Run cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
---
    Updating zerocopy v0.7.34 -> v0.7.35
    Updating zerocopy-derive v0.7.34 -> v0.7.35
    Updating zerovec v0.10.2 -> v0.10.4
    Updating zerovec-derive v0.10.2 -> v0.10.3
note: pass `--verbose` to see 85 unchanged dependencies behind latest
##[group]Run echo -e "\nrustbook dependencies:" >> cargo_update.log
echo -e "\nrustbook dependencies:" >> cargo_update.log
cargo update --manifest-path src/tools/rustbook 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.