Skip to content

Rollup of 4 pull requests - #164022

Closed
JonathanBrouwer wants to merge 10 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-4cqZJAx
Closed

JonathanBrouwer wants to merge 10 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-4cqZJAx

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

kenta-afk and others added 10 commits October 3, 2026 00:07
```
error[E0277]: `{closure@$DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19: 33:21}` is not an iterator
  --> $DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:34:14
   |
LL |     for _ in closure {}
   |              ^^^^^^^ `{closure@$DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19: 33:21}` is not an iterator
   |
help: the trait `Iterator` is not implemented for closure `{closure@$DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19: 33:21}`
  --> $DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19
   |
LL |     let closure = || vec![1u8].into_iter();
   |                   ^^
   = note: required for `{closure@$DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19: 33:21}` to implement `IntoIterator`
help: use parentheses to call this closure
   |
LL |     for _ in closure() {}
   |                     ++
```
…JohnTitor

Updates the expect message library/core/src/time.rs

updates the expect message in library/core/src/time.rs.
Updated to show the expected state instead of what actually happened.

rust-lang#159751
When mentioning that closure doesn't implement trait, point at closure

```
error[E0277]: `{closure@$DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19: 33:21}` is not an iterator
  --> $DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:34:14
   |
LL |     for _ in closure {}
   |              ^^^^^^^ `{closure@$DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19: 33:21}` is not an iterator
   |
help: the trait `Iterator` is not implemented for closure `{closure@$DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19: 33:21}`
  --> $DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19
   |
LL |     let closure = || vec![1u8].into_iter();
   |                   ^^
   = note: required for `{closure@$DIR/suggest-calling-fn-in-for-loop-issue-161564.rs:33:19: 33:21}` to implement `IntoIterator`
help: use parentheses to call this closure
   |
LL |     for _ in closure() {}
   |                     ++
```
…d, r=Urgau

[rustdoc] Prefer local paths over remote ones when foreign item is locally reexported

This is the last failure from rust-lang#162808:

```
src/std/sys/fs/unix.rs.html:1171: broken link fragment `#method.new` pointing to `core/io/struct.Error.html`
```

`std` reexports `Error` locally, and `alloc` is the one implementing the `Error::new` method. So `std` has both `Error` and `Error::new` locally. So instead of trying to link to `core::Error::new` (which doesn't exist), we first check if we locally reexport `Error` with the `paths` map and use it as a shortcut.

PS: I got annoyed about adding/removing `#[derive(Debug)]` every time so this time I just leave them there. :3

r? @Urgau
cg_llvm: Avoid some explicit casts to `*const c_char`

- Follow-up to rust-lang#163789
---

This is another application of the general principle noted in `rustc_codegen_llvm::ffi`:

> Normally it's a good idea for Rust-side bindings to match the corresponding C-side function declarations as closely as possible. But when passing `&str` or `&[u8]` data as a pointer/length pair, it's more convenient to declare the Rust-side pointer as `*const c_uchar` instead of `*const c_char`. Both pointer types have the same ABI, and using `*const c_uchar` avoids the need for an extra cast from `*const u8` on the Rust side.

For the changes in the main commit, a pointer/length string was being passed with `*const c_char` as the pointer type. This PR changes the Rust-side declaration to take `*const c_uchar` instead.

Changing the declared type avoids the need for explicit casts, making it easier to notice any accidental type errors.

---

A second commit also removes some pointer casts that were completely unnecessary.

There should be no change to compiler output.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 9, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Oct 9, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu,test-x86_64-gnu-llvm-22-3

@rust-bors

rust-bors Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5af7baa has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Oct 9, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 9, 2026
Rollup of 4 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 9, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #163666 (Updates the expect message library/core/src/time.rs)
 - #164000 (When mentioning that closure doesn't implement trait, point at closure)
 - #164007 ([rustdoc] Prefer local paths over remote ones when foreign item is locally reexported)
 - #164017 (cg_llvm: Avoid some explicit casts to `*const c_char`)
@rust-bors rust-bors Bot 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 Oct 9, 2026
@rust-bors

rust-bors Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 4a82f49 failed: CI. Failed job:

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 9, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2026
@rust-bors

rust-bors Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)

@rust-bors

rust-bors Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: c58bca6 (c58bca675265798bc7b2c4a6dff9938ad3f997cd)
Base parent: 76c9095 (76c90957b7e422c4b9c45192b0197214d7de5a54)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants