Skip to content

Rollup of 10 pull requests #142750

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

Closed
wants to merge 28 commits into from
Closed

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Jun 19, 2025

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

deven and others added 28 commits June 11, 2025 00:27
Implements `trim_prefix` and `trim_suffix` methods for both `slice` and
`str` types which remove at most one occurrence of a prefix/suffix while
always returning a string/slice (rather than Option), enabling easy
method chaining.
rewrite `optimize` attribute to use new attribute parsing infrastructure

r? `@oli-obk`

I'm afraid we'll get quite a few of these PRs in the future. If we get a lot of trivial changes I'll start merging multiple into one PR. They should be easy to review :)

Waiting on rust-lang#138165 first
…r=ChrisDenton,tgross35

Implement send_signal for unix child processes

Tracking issue: rust-lang#141975

There are two main differences between my implementation and the Public API section of the tracking issue. ~First, `send_signal` requires a mutable reference, like `Child::kill`.~ Second, `ChildExt` has `Sealed` as a supertrait, bringing it more in line with other extension traits like `CommandExt`.

try-job: `dist-various*`
try-job: `test-various*`
Add `trim_prefix` and `trim_suffix` methods for both `slice` and `str` types.

Implements `trim_prefix` and `trim_suffix` methods for both `slice` and `str` types, which remove at most one occurrence of a prefix/suffix while always returning a string/slice (rather than Option), enabling easy method chaining.

## Tracking issue
rust-lang#142312

## API
```rust
impl str {
    pub fn trim_prefix<P: Pattern>(&self, prefix: P) -> &str;
    pub fn trim_suffix<P: Pattern>(&self, suffix: P) -> &str
    where
        for<'a> P::Searcher<'a>: ReverseSearcher<'a>;
}

impl<T> [T] {
    pub fn trim_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> &[T]
    where
        T: PartialEq;
    pub fn trim_suffix<P: SlicePattern<Item = T> + ?Sized>(&self, suffix: &P) -> &[T]
    where
        T: PartialEq;
}
```

## Examples
```rust
// Method chaining
assert_eq!(" <https://example.com/> ".trim().trim_prefix('<').trim_suffix('>').trim(), "https://example.com/");

// Slices
let v = &[10, 40, 30];
assert_eq!(v.trim_prefix(&[10]), &[40, 30][..]);
```

## ACP
Originally proposed in rust-lang/libs-team#597
install docs for each target in different directory

Solves rust-lang#140922
Reason about borrowed classes in CopyProp.

Fixes rust-lang#141122

The current implementation of `CopyProp` avoids unifying two borrowed locals, as this would change the result of address comparison.

However, the implementation was inconsistent with the general algorithm, which identifies equivalence classes of locals and then replaces all locals by a single representative of their equivalence class.

This PR fixes it by forbidding the unification of two *classes* if any of those contain a borrowed local.
vec_deque/fmt/vec tests: remove static mut

More rust-lang#125035.

r? `@tgross35`
Reduce uses of `hir_crate`.

I tried rebasing my old incremental-HIR branch. This is a by-product, which is required if we want to get rid of `hir_crate` entirely.

The second commit is a drive-by cleanup. It can be pulled into its own PR.

r? ``@oli-obk``
…r-errors

expand: Remove some unnecessary generic parameters
Update books

## rust-lang/book

1 commits in 4433c9f0cad8460bee05ede040587f8a1fa3f1de..8a6d44e45b7b564eeb6bae30507e1fbac439d72d
2025-06-18 17:06:36 UTC to 2025-06-18 17:06:36 UTC

- Chapter 12 from tech review (rust-lang/book#4410)

## rust-lang/reference

6 commits in d4c66b346f4b72d29e70390a3fa3ea7d4e064db1..50fc1628f36563958399123829c73755fa7a8421
2025-06-19 02:02:39 UTC to 2025-06-17 21:18:46 UTC

- Document inferred const args (`feature(generic_arg_infer)`) (rust-lang/reference#1835)
- const_eval: we allow references to statics and promoteds (rust-lang/reference#1858)
- Fix missing rule on destructors (rust-lang/reference#1861)
- Fix inconsistent heading depth (rust-lang/reference#1860)
- Fix recursive root-accessible grammar check (rust-lang/reference#1852)
- Fix grammar links (rust-lang/reference#1851)

## rust-lang/rust-by-example

1 commits in 9baa9e863116cb9524a177d5a5c475baac18928a..05c7d8bae65f23a1837430c5a19be129d414f5ec
2025-06-18 13:15:17 UTC to 2025-06-18 13:15:17 UTC

- Revert "introduce new ``@media`` query to set a higher content width on ultra wide screens" (rust-lang/rust-by-example#1939)
…r, r=Kobzol

add comment to `src/bootstrap/build.rs`

I attempted to remove this build script but it's apparently needed. Add a comment for why.
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend labels Jun 19, 2025
@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 Jun 19, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Jun 19, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 19, 2025

📌 Commit 1f9b14b has been approved by jhpratt

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 Jun 19, 2025
@bors
Copy link
Collaborator

bors commented Jun 19, 2025

⌛ Testing commit 1f9b14b with merge 86dbd71...

bors added a commit that referenced this pull request Jun 19, 2025
Rollup of 10 pull requests

Successful merges:

 - #138291 (rewrite `optimize` attribute to use new attribute parsing infrastructure)
 - #141990 (Implement send_signal for unix child processes)
 - #142331 (Add `trim_prefix` and `trim_suffix` methods for both `slice` and `str` types.)
 - #142478 (install docs for each target in different directory)
 - #142571 (Reason about borrowed classes in CopyProp.)
 - #142668 (vec_deque/fmt/vec tests: remove static mut)
 - #142687 (Reduce uses of `hir_crate`.)
 - #142690 (expand: Remove some unnecessary generic parameters)
 - #142699 (Update books)
 - #142714 (add comment to `src/bootstrap/build.rs`)

Failed merges:

 - #142502 (rustdoc_json: improve handling of generic args)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-i686-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Dist rust-nightly-i686-pc-windows-msvc
 finished in 240.499 seconds

thread 'main' panicked at src\bootstrap\src\lib.rs:1847:25:
could not read dir "D:\\a\\rust\\rust\\build\\tmp\\tarball\\rust\\i686-pc-windows-msvc\\rust-docs-nightly-i686-pc-windows-msvc\\rust-docs": Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 1:50:18
  local time: Fri Jun 20 00:17:19 CUT 2025
  network time: Fri, 20 Jun 2025 00:17:19 GMT
##[error]Process completed with exit code 1.

@bors
Copy link
Collaborator

bors commented Jun 20, 2025

💔 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 Jun 20, 2025
@jhpratt jhpratt closed this Jun 20, 2025
@jhpratt jhpratt deleted the rollup-6t1h6wx branch June 20, 2025 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend 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-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.