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

Closed
wants to merge 25 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Voultapher and others added 25 commits July 27, 2024 16:47
The new sort implementations have the ability to
detect Ord violations in many cases. This commit
improves the message in a way that should help
users realize what went wrong in their program.
…ble*

- Move panic information into # Panics section
- Fix mentions of T: Ord that should be compare
- Add missing information
- Use if the implementation of [`Ord`] for `T`
  language
- Link to total order wiki page
- Rework total order help and examples
- Improve language to be more precise and less
  prone to misunderstandings.
- Fix usage of `sort_unstable_by` in `sort_by`
  example
- Fix missing author mention
- Use more consistent example input for sort
- Use more idiomatic assert_eq! in examples
- Use more natural "comparison function" language
  instead of "comparator function"
Since [1], `Cargo.lock` was split into `Cargo.lock` and
`library/Cargo.lock`. Update Triagebot to give the same warning for both.

[1]: rust-lang#128534
…manieu

PinCoerceUnsized trait into core

cc `@Darksonn` `@wedsonaf` `@ojeda`

This is a PR to introduce a `PinCoerceUnsized` trait in order to make trait impls generated by the proc-macro `#[derive(SmartPointer)]`, proposed by [RFC](https://github.com/rust-lang/rfcs/blob/e17e19ac7ad1c8ccad55d4babfaee1aa107d1da5/text/3621-derive-smart-pointer.md#pincoerceunsized-1), sound. There you may find explanation, justification and discussion about the alternatives.

Note that we do not seek stabilization of this `PinCoerceUnsized` trait in the near future. The stabilisation of this trait does not block the eventual stabilization process of the `#[derive(SmartPointer)]` macro. Ideally, use of `DerefPure` is more preferrable except this will actually constitute a breaking change. `PinCoerceUnsized` emerges as a solution to the said soundness hole while avoiding the breaking change. More details on the `DerefPure` option have been described in this [section](https://github.com/rust-lang/rfcs/blob/e17e19ac7ad1c8ccad55d4babfaee1aa107d1da5/text/3621-derive-smart-pointer.md#derefpure) of the RFC linked above.

Earlier discussion can be found in this [Zulip stream](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/Pin.20and.20soundness.20of.20unsizing.20coercions) and [rust-for-linux thread](https://rust-lang.zulipchat.com/#narrow/stream/425075-rust-for-linux/topic/.23.5Bderive.28SmartPointer.29.5D.20and.20pin.20unsoundness.20rfc.233621).

try-job: dist-various-2
…elp, r=workingjubilee

Improve `Ord` violation help

Recent experience in rust-lang#128083 showed that the panic message when an Ord violation is detected by the new sort implementations can be confusing. So this PR aims to improve it, together with minor bug fixes in the doc comments for sort*, sort_unstable* and select_nth_unstable*.

Is it possible to get these changes into the 1.81 release? It doesn't change behavior and would greatly help when users encounter this panic for the first time, which they may after upgrading to 1.81.

Tagging ``@orlp``
Forbid unused unsafe in vxworks-specific std modules

Tracking issue rust-lang#127747
Adding deny(unsafe_op_in_unsafe_fn) in VxWorks specific files did not cause any error.
Most of VxWorks falls back on Unix libraries. So we'll have to wait for Unix changes.

r? ``@workingjubilee``
…r=WaffleLapkin

interpret: refactor function call handling to be better-abstracted

Add a new function `init_stack_frame` that pushes a stack frame and passes the arguments, and use that basically everywhere that the raw underlying `push_stack_frame` used to be called. This splits the previous monster function `eval_fn_call` into two parts: figuring out the MIR to call and the arguments to pass, and then actually setting up the stack frame.

Also re-organize the files a bit:
- The previous `terminator.rs` is split into a new `call.rs` with all the argument-passing logic, and the rest goes into `step.rs` where the other main dispatcher functions already live (in particular, `eval_statement`).
- All the stack frame handling from `eval_context.rs` is moved to a new `stack.rs`.
…Simulacrum

Add a triagebot mention for `library/Cargo.lock`

Since [1], `Cargo.lock` was split into `Cargo.lock` and `library/Cargo.lock`. Update Triagebot to give the same warning for both.

[1]: rust-lang#128534
Don't ICE when getting an input file name's stem fails

Fixes rust-lang#128681

The file stem is only used as a user-friendly prefix on intermediary files. While nice to have, it's not the end of the world if it fails so there's no real reason to emit an error here. We can continue with a fixed name as we do when an anonymous string is used.
…cote

Consider `cfg_attr` checked by `CheckAttrVisitor`

I forgor about `cfg_attr` in rust-lang#128581, it should be treated like `cfg`.

Fixes rust-lang#128716.
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs O-SGX Target: SGX O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 6, 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. rollup A PR which is a rollup labels Aug 6, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Aug 6, 2024

📌 Commit 38c2e62 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 6, 2024
@bors
Copy link
Contributor

bors commented Aug 6, 2024

⌛ Testing commit 38c2e62 with merge e86636c...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 6, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125048 (PinCoerceUnsized trait into core)
 - rust-lang#128273 (Improve `Ord` violation help)
 - rust-lang#128406 (implement BufReader::peek)
 - rust-lang#128539 (Forbid unused unsafe in vxworks-specific std modules)
 - rust-lang#128687 (interpret: refactor function call handling to be better-abstracted)
 - rust-lang#128692 (Add a triagebot mention for `library/Cargo.lock`)
 - rust-lang#128710 (Don't ICE when getting an input file name's stem fails)
 - rust-lang#128718 (Consider `cfg_attr` checked by `CheckAttrVisitor`)

r? `@ghost`
`@rustbot` modify labels: rollup
@pietroalbini
Copy link
Member

@bors retry

Yield priority to the stable release.

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 6, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125048 (PinCoerceUnsized trait into core)
 - rust-lang#128273 (Improve `Ord` violation help)
 - rust-lang#128406 (implement BufReader::peek)
 - rust-lang#128539 (Forbid unused unsafe in vxworks-specific std modules)
 - rust-lang#128687 (interpret: refactor function call handling to be better-abstracted)
 - rust-lang#128692 (Add a triagebot mention for `library/Cargo.lock`)
 - rust-lang#128710 (Don't ICE when getting an input file name's stem fails)
 - rust-lang#128718 (Consider `cfg_attr` checked by `CheckAttrVisitor`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Aug 6, 2024

⌛ Testing commit 38c2e62 with merge a1486cf...

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
      Total Number of Cores: 3
      Memory: 7 GB
      System Firmware Version: 10151.140.19
      OS Loader Version: 10151.140.19
      Serial Number (system): ZVNYTL1R5J
      Provisioning UDID: 0000FE00-9D477AFD97FDC071
      Activation Lock Status: Disabled

hw.ncpu: 3
---
##[endgroup]
[TIMING] core::build_steps::tool::ToolBuild { compiler: Compiler { stage: 0, host: aarch64-apple-darwin }, target: aarch64-apple-darwin, tool: "linkchecker", path: "src/tools/linkchecker", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [] } -- 0.116
[TIMING] core::build_steps::tool::Linkchecker { compiler: Compiler { stage: 0, host: aarch64-apple-darwin }, target: aarch64-apple-darwin } -- 0.000
##[group]Testing stage0 Linkcheck (aarch64-apple-darwin)
alloc/vec/struct.Vec.html:1287: broken link fragment `#method.sort_by` pointing to `core/primitive.slice.html`
number of HTML files scanned: 43682
number of HTML redirects found: 13738
number of links checked: 3217613
number of links ignored due to external: 79633
number of links ignored due to external: 79633
number of links ignored due to exceptions: 17
number of intra doc links ignored: 8
errors found: 1
found some broken links

Command DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0-bootstrap-tools/aarch64-apple-darwin/release/deps:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0/lib" RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0/bin/rustc" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0-tools-bin/linkchecker" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/doc" (failure_mode=DelayFail) did not execute successfully.
Created at: src/core/build_steps/tool.rs:1113:23
Executed at: src/core/build_steps/test.rs:152:84

Build completed unsuccessfully in 0:49:04

@bors
Copy link
Contributor

bors commented Aug 6, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 6, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-d7ecih7 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 & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs O-SGX Target: SGX O-unix Operating system: Unix-like rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.