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 29 pull requests #138071

Closed
wants to merge 69 commits into from
Closed

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Mar 5, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

arlosi and others added 30 commits February 20, 2025 11:47
All other methods in this file have #[inline] and these methods are very
similar to those of &[u8] which are already inlined here.
Instead, we adopt the position that introducing an `unsafe` field
itself carries a safety invariant: that if you assign an invariant
to that field weaker than what the field's destructor requires,
you must ensure that field is in a droppable state in your
destructor.

See:
- rust-lang/rfcs#3458 (comment)
- https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/unsafe.20fields.20RFC/near/502113897
This patch makes BufReader::peek()'s doctest call read_more() to refill
the buffer before the inner reader hits EOF. This exposes a bug in
read_more() that causes an out-of-bounds slice access and segfault.
Buffer::read_more() is supposed to refill the buffer without discarding
its contents, which are in the range `pos .. filled`.

It mistakenly borrows the range `pos ..`, fills that, and then
increments `filled` by the amount read. This overwrites the buffer's
existing contents and sets `filled` to a too-large value that either
exposes uninitialized bytes or walks off the end of the buffer entirely.

This patch makes it correctly fill only the unfilled portion of the
buffer, which should maintain all the type invariants and fix the test
failure introduced in commit b119671.
…s doc(hidden)

Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
When encountering a resolve E0575 error for an associated method (when a type was expected), see if it could have been an intended return type notation bound.

```
error[E0575]: expected associated type, found associated function `Trait::method`
  --> $DIR/bad-inputs-and-output.rs:31:36
   |
LL | fn foo_qualified<T: Trait>() where <T as Trait>::method(i32): Send {}
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^ not a associated type
   |
help: you might have meant to use the return type notation syntax
   |
LL - fn foo_qualified<T: Trait>() where <T as Trait>::method(i32): Send {}
LL + fn foo_qualified<T: Trait>() where T::method(..): Send {}
   |
```
At first glance, the extra casework seems pointless and needlessly
error-prone. Clarify that there is a reason for it being there.
This is error-prone. Explicitly write down which cases don't need
anything substituted. Turn the `OpaqueType` case, which currently
seems to be unreachable, into a `bug!`.
jieyouxu added 5 commits March 6, 2025 03:01
… r=oli-obk

interpret/provenance_map: consistently use range_is_empty

rust-lang#137704 started using this for per-ptr provenance; let's be consistent and use it also for the per-byte provenance check. Also rename the methods to avoid having both "get" and "is_empty" in the name.

r? ``@oli-obk``
Update `compiler-builtins` to 0.1.151

This enables `f16` builtins for loongarch [1] and adds support for Cygwin [2].

[1]: rust-lang/compiler-builtins#770
[2]: rust-lang/compiler-builtins#774

try-job: dist-loongarch64-linux
try-job: dist-loongarch64-musl
…youxu

trim channel value in `get_closest_merge_commit`

This was a silly bug which caused `git_upstream_merge_base` to never work because it was `nightly\n` not `nightly`.
strip `-Wlinker-messages` wrappers from `rust-lld` rmake test

The `tests/run-make/rust-lld` rmake test is failing locally on my M1, due to linker messages being in a different shape than the test expects: it asserts that the LLD version is the first linker message, which is seemingly not always the case on osx I guess.

```console
thread 'main' panicked at /Users/lqd/rust/lqd-rust/tests/run-make/rust-lld/rmake.rs:24:5:
the LLD version string should be present in the output logs:
warning: linker stderr: rust-lld: directory not found for option -L/usr/local/lib
         LLD 20.1.0 (https://github.com/rust-lang/llvm-project.git 1c3bb96fdb6db7b8e8f24edb016099c223fdd27e)
         Library search paths:
             /Users/lqd/rust/lqd-rust/build/aarch64-apple-darwin/test/run-make/rust-lld/rmake_out
             /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib
         Framework search paths:
             /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks
```

This PR normalizes away the `-Wlinker-messages` wrappers around the linker output, to remove the requirement that the linker version is the first linker message / is prefixed with the warning wrapper in the regex.

(also another strange thing to explain the pre-existing regex: it seems the LLD version is sometimes output on stderr sometimes on stdout cool stuff)

We could do this for the other lld rmake tests, but they're only enabled on x64 linux so less likely to have random linker messages appearing without anyone noticing.
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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-infra Relevant to the infrastructure 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. rollup A PR which is a rollup labels Mar 5, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Mar 5, 2025

Mostly to kick out any PR that fails quickly, going to split in two if a PR fails.
@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 5, 2025

📌 Commit 1c22311 has been approved by jieyouxu

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 Mar 5, 2025
@onur-ozkan
Copy link
Member

image

@bors
Copy link
Contributor

bors commented Mar 5, 2025

⌛ Testing commit 1c22311 with merge 06306c0...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2025
Rollup of 29 pull requests

Successful merges:

 - rust-lang#135733 (Implement `&pin const self` and `&pin mut self` sugars)
 - rust-lang#137107 (Override default `Write` methods for cursor-like types)
 - rust-lang#137303 (Remove `MaybeForgetReturn` suggestion)
 - rust-lang#137327 (Undeprecate env::home_dir)
 - rust-lang#137358 (Match Ergonomics 2024: add context and examples to the unstable book)
 - rust-lang#137534 ([rustdoc] hide item that is not marked as doc(inline) and whose src is doc(hidden))
 - rust-lang#137565 (Try to point of macro expansion from resolver and method errors if it involves macro var)
 - rust-lang#137612 (Update bootstrap to edition 2024)
 - rust-lang#137637 (Check dyn flavor before registering upcast goal on wide pointer cast in MIR typeck)
 - rust-lang#137643 (Add DWARF test case for non-C-like `repr128` enums)
 - rust-lang#137685 (self-contained linker: conservatively default to `-znostart-stop-gc` on x64 linux)
 - rust-lang#137744 (Re-add `Clone`-derive on `Thir`)
 - rust-lang#137758 (fix usage of ty decl macro fragments in attributes)
 - rust-lang#137764 (Ensure that negative auto impls are always applicable)
 - rust-lang#137772 (Fix char count in `Display` for `ByteStr`)
 - rust-lang#137798 (ci: use ubuntu 24 on arm large runner)
 - rust-lang#137802 (miri native-call support: all previously exposed provenance is accessible to the callee)
 - rust-lang#137805 (adjust Layout debug printing to match the internal field name)
 - rust-lang#137808 (Do not require that unsafe fields lack drop glue)
 - rust-lang#137820 (Clarify why InhabitedPredicate::instantiate_opt exists)
 - rust-lang#137825 (Provide more context on resolve error caused from incorrect RTN)
 - rust-lang#137827 (Add timestamp to unstable feature usage metrics)
 - rust-lang#137832 (Fix crash in BufReader::peek())
 - rust-lang#137910 (Improve error message for `AsyncFn` trait failure for RPIT)
 - rust-lang#137920 (interpret/provenance_map: consistently use range_is_empty)
 - rust-lang#138038 (Update `compiler-builtins` to 0.1.151)
 - rust-lang#138046 (trim channel value in `get_closest_merge_commit`)
 - rust-lang#138052 (strip `-Wlinker-messages` wrappers from `rust-lld` rmake test)
 - rust-lang#138053 (Increase the max. custom try jobs requested to `20`)

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

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

Click to see the possible cause of the failure (guessed by this bot)
   = note: consult the function's documentation for information on how to avoid undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
  --> src\bootstrap\src\utils\job.rs:63:5
   |
63 |     pub unsafe fn setup(build: &mut Build) {
   = note: `-D unsafe-op-in-unsafe-fn` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unsafe_op_in_unsafe_fn)]`

error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:68:9
   |
68 |         SetErrorMode(mode & !SEM_NOGPFAULTERRORBOX);
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::CreateJobObjectW` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:71:19
   |
71 |         let job = CreateJobObjectW(None, PCWSTR::null()).unwrap();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::SetInformationJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:83:17
83 |           let r = SetInformationJobObject(
   |  _________________^
84 | |             job,
85 | |             JobObjectExtendedLimitInformation,
85 | |             JobObjectExtendedLimitInformation,
86 | |             &info as *const _ as *const c_void,
87 | |             mem::size_of_val(&info) as u32,
   | |_________^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior
   = note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::AssignProcessToJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:17
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::Threading::GetCurrentProcess` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:47
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::Foundation::CloseHandle` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:94:13
   |
94 |             CloseHandle(job).ok();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior

---
   = note: consult the function's documentation for information on how to avoid undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
  --> src\bootstrap\src\utils\job.rs:63:5
   |
63 |     pub unsafe fn setup(build: &mut Build) {
   = note: `-D unsafe-op-in-unsafe-fn` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unsafe_op_in_unsafe_fn)]`

error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:68:9
   |
68 |         SetErrorMode(mode & !SEM_NOGPFAULTERRORBOX);
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::CreateJobObjectW` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:71:19
   |
71 |         let job = CreateJobObjectW(None, PCWSTR::null()).unwrap();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::SetInformationJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:83:17
83 |           let r = SetInformationJobObject(
   |  _________________^
84 | |             job,
85 | |             JobObjectExtendedLimitInformation,
85 | |             JobObjectExtendedLimitInformation,
86 | |             &info as *const _ as *const c_void,
87 | |             mem::size_of_val(&info) as u32,
   | |_________^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior
   = note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::AssignProcessToJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:17
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::Threading::GetCurrentProcess` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:47
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::Foundation::CloseHandle` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:94:13
   |
94 |             CloseHandle(job).ok();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior

---
   = note: consult the function's documentation for information on how to avoid undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
  --> src\bootstrap\src\utils\job.rs:63:5
   |
63 |     pub unsafe fn setup(build: &mut Build) {
   = note: `-D unsafe-op-in-unsafe-fn` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unsafe_op_in_unsafe_fn)]`

error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:68:9
   |
68 |         SetErrorMode(mode & !SEM_NOGPFAULTERRORBOX);
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::CreateJobObjectW` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:71:19
   |
71 |         let job = CreateJobObjectW(None, PCWSTR::null()).unwrap();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::SetInformationJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:83:17
83 |           let r = SetInformationJobObject(
   |  _________________^
84 | |             job,
85 | |             JobObjectExtendedLimitInformation,
85 | |             JobObjectExtendedLimitInformation,
86 | |             &info as *const _ as *const c_void,
87 | |             mem::size_of_val(&info) as u32,
   | |_________^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior
   = note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::AssignProcessToJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:17
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::Threading::GetCurrentProcess` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:47
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::Foundation::CloseHandle` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:94:13
   |
94 |             CloseHandle(job).ok();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior

---
   = note: consult the function's documentation for information on how to avoid undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
  --> src\bootstrap\src\utils\job.rs:63:5
   |
63 |     pub unsafe fn setup(build: &mut Build) {
   = note: `-D unsafe-op-in-unsafe-fn` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unsafe_op_in_unsafe_fn)]`

error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:68:9
   |
68 |         SetErrorMode(mode & !SEM_NOGPFAULTERRORBOX);
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::CreateJobObjectW` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:71:19
   |
71 |         let job = CreateJobObjectW(None, PCWSTR::null()).unwrap();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::SetInformationJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:83:17
83 |           let r = SetInformationJobObject(
   |  _________________^
84 | |             job,
85 | |             JobObjectExtendedLimitInformation,
85 | |             JobObjectExtendedLimitInformation,
86 | |             &info as *const _ as *const c_void,
87 | |             mem::size_of_val(&info) as u32,
   | |_________^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior
   = note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::AssignProcessToJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:17
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::Threading::GetCurrentProcess` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:47
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::Foundation::CloseHandle` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:94:13
   |
94 |             CloseHandle(job).ok();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior

---
   = note: consult the function's documentation for information on how to avoid undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
  --> src\bootstrap\src\utils\job.rs:63:5
   |
63 |     pub unsafe fn setup(build: &mut Build) {
   = note: `-D unsafe-op-in-unsafe-fn` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unsafe_op_in_unsafe_fn)]`

error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
error[E0133]: call to unsafe function `windows::Win32::System::Diagnostics::Debug::SetErrorMode` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:68:9
   |
68 |         SetErrorMode(mode & !SEM_NOGPFAULTERRORBOX);
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::CreateJobObjectW` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:71:19
   |
71 |         let job = CreateJobObjectW(None, PCWSTR::null()).unwrap();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::SetInformationJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:83:17
83 |           let r = SetInformationJobObject(
   |  _________________^
84 | |             job,
85 | |             JobObjectExtendedLimitInformation,
85 | |             JobObjectExtendedLimitInformation,
86 | |             &info as *const _ as *const c_void,
87 | |             mem::size_of_val(&info) as u32,
   | |_________^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior
   = note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function `windows::Win32::System::JobObjects::AssignProcessToJobObject` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:17
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::System::Threading::GetCurrentProcess` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:92:47
   |
92 |         let r = AssignProcessToJobObject(job, GetCurrentProcess());
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior


error[E0133]: call to unsafe function `windows::Win32::Foundation::CloseHandle` is unsafe and requires unsafe block
##[error]  --> src\bootstrap\src\utils\job.rs:94:13
   |
94 |             CloseHandle(job).ok();
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior

@bors
Copy link
Contributor

bors commented Mar 5, 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 Mar 5, 2025
@jieyouxu jieyouxu closed this Mar 5, 2025
@jieyouxu jieyouxu deleted the rollup-a19djgi branch March 5, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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-infra Relevant to the infrastructure 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.