Skip to content

Rollup of 8 pull requests #140356

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 22 commits into from
Closed

Conversation

tgross35
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

clarfonthey and others added 22 commits February 22, 2025 14:59
It wants an owned path, so pass an owned path
This removes the hard-coded list of edition support in the lint-docs
tool, and instead just assumes the edition attribute is something valid.
There isn't a real reason to have this, as rustc will error if given a
wrong number. This should be easier to maintain going forward.
This updates the lint-docs tool to default to the 2024 edition. The lint
docs are supposed to illustrate the code with the latest edition, and I
just forgot to update this in
rust-lang#133349.

Some docs needed to add the `edition` attribute since they were assuming
a particular edition, but were missing the explicit annotation.
Stabilise `std::ffi::c_str`

This finished FCP in rust-lang#112134 but never actually got a stabilisation PR. Since the FCP in rust-lang#120048 recently passed to add the `os_str` module, it would be nice to also merge this too, to ensure that both get added in the next version.

Note: The added stability attributes which *somehow* were able to be omitted before (rustc bug?) were added based on the fact that they were added in 3025513, which ended up in 1.85.0.

Closes: rust-lang#112134

r? libs-api
…ss35

Use char::is_whitespace directly in str::trim*

Use the method directly instead of wrapping it in a closure.
…, r=tgross35

fix docs for `Peekable::next_if{_eq}`

These seem like copy-paste errors

(except `saves the value of` 👉 `retains` which just sounds better to me)
…ng, r=fmease

Fix detection of main function if there are expressions around it

Fixes rust-lang#140162.
Fixes rust-lang#139651.

Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run).

r? ```@fmease```

try-job: x86_64-gnu-aux
Update example to use CStr::to_string_lossy
Clarified bootstrap optimization "true" argument

fixes rust-lang#140328
session: Cleanup `CanonicalizedPath::new`

It wants an owned path, so pass an owned path.
…r-errors

Update lint-docs to default to Rust 2024

This updates the lint-docs tool to default to the 2024 edition. The lint docs are supposed to illustrate the code with the latest edition, and I just forgot to update this in rust-lang#133349.

Some docs needed to add the `edition` attribute since they were assuming a particular edition, but were missing the explicit annotation.

This also includes a commit to simplify the edition handling in lint-docs.
@rustbot rustbot added 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 Apr 27, 2025
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 27, 2025

📌 Commit c718a63 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 Apr 27, 2025
@bors
Copy link
Collaborator

bors commented Apr 27, 2025

⌛ Testing commit c718a63 with merge c955f48...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#137439 (Stabilise `std::ffi::c_str`)
 - rust-lang#139031 (Use char::is_whitespace directly in str::trim*)
 - rust-lang#139090 (fix docs for `Peekable::next_if{_eq}`)
 - rust-lang#140220 (Fix detection of main function if there are expressions around it)
 - rust-lang#140297 (Update example to use CStr::to_string_lossy)
 - rust-lang#140330 (Clarified bootstrap optimization "true" argument)
 - rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
 - rust-lang#140348 (Update lint-docs to default to Rust 2024)

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

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests\run-make\amdgpu-kd stdout ----

error: rmake recipe failed to complete
status: exit code: 1
command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\amdgpu-kd\\rmake.exe"
stdout: none
--- stderr -------------------------------
command failed at line 18
Command { cmd: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\amdgpu-kd\\rmake_out" "--crate-name" "foo" "--target=amdgcn-amd-amdhsa" "-Ctarget-cpu=gfx900" "--crate-type" "cdylib" "foo.rs", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe", defused: true, armed_location: Location { file: "D:\\a\\rust\\rust\\tests\\run-make\\amdgpu-kd\\rmake.rs", line: 12, col: 5 } }, already_executed: true }
output status: `exit code: 1`
=== STDOUT ===



=== STDERR ===
error: linking with `rust-lld` failed: exit code: 0xc0000374
  |
  = note: "rust-lld" "-flavor" "gnu" "--version-script=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcCcaGpY\\list" "--no-undefined-version" "<1 object files omitted>" "--as-needed" "-L" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcCcaGpY\\raw-dylibs" "-Bdynamic" "--eh-frame-hdr" "-z" "noexecstack" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\run-make\\amdgpu-kd\\rmake_out" "-o" "foo.elf" "--gc-sections" "-shared"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: 

error: aborting due to 1 previous error
------------------------------------------
---
test result: FAILED. 279 passed; 1 failed; 110 ignored; 0 measured; 6 filtered out; finished in 200.33s

Some tests failed in compiletest suite=run-make mode=run-make host=x86_64-pc-windows-gnu target=x86_64-pc-windows-gnu
Build completed unsuccessfully in 2:23:34
make: *** [Makefile:124: ci-mingw-x] Error 1
  local time: Sun Apr 27 07:41:49 CUT 2025
  network time: Sun, 27 Apr 2025 07:41:49 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Collaborator

bors commented Apr 27, 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 Apr 27, 2025
@tgross35 tgross35 closed this Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.