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 9 pull requests #137226

Closed
wants to merge 19 commits into from
Closed

Rollup of 9 pull requests #137226

wants to merge 19 commits into from

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Feb 18, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Martin Nordholts and others added 19 commits February 17, 2025 11:59
In 136324 the doctest for `f16::erf()` was gated with
`reliable_f16_math`. Add the same gate on `f16::erfc()` to
avoid:

    rust_out.71e2e529d20ea47d-cgu.0:\
    (.text._ZN8rust_out4main43_doctest_main_library_std_src_f16_rs_1321_017h485f3ffe6bf2a981E+0x38): \
    undefined reference to `__gnu_h2f_ieee'

on MIPS (and maybe other architectures).
This adds panicking Hash impls for several resolver types that don't
actually satisfy this condition. It's not obvious to me that
rustc_resolve actually upholds the Interned guarantees but fixing that
seems pretty hard (the structures have at minimum some interior
mutability, so it's not really recursively hashable in place...).
Following rust-lang#137165 (Use `tell` for `<File as Seek>::stream_position`),
`tell` is now directly exposed via `stream_position`, making
`<File as FileExt>::tell` redundant. Remove it.
This is a really weird module. For example, what does `tcx` in
`rustc_middle::mir::tcx::PlaceTy` mean? The answer is "not much".

The top-level module comment says:

> Methods for the various MIR types. These are intended for use after
> building is complete.

Awfully broad for a module that has a handful of impl blocks for some
MIR types, none of which really relates to `TyCtxt`. `git blame`
indicates the comment is ancient, from 2015, and made sense then.

This module is now vestigial. This commit removes it and moves all the
code within into `rustc_middle::mir::statement`. Some specifics:

- `Place`, `PlaceRef`, `Rvalue`, `Operand`, `BorrowKind`: they all have `impl`
  blocks in both the `tcx` and `statement` modules. The commit merges
  the former into the latter.

- `BinOp`, `UnOp`: they only have `impl` blocks in `tcx`. The commit
  moves these into `statement`.

- `PlaceTy`, `RvalueInitializationState`: they are defined in `tcx`.
  This commit moves them into `statement` *and* makes them available in
  `mir::*`, like many other MIR types.
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
…kingjubilee

Install more signal stack trace handlers

This PR install the signal stack handler to more signals (`SIGILL`, ~~`SIGTRAP`~~, ~~`SIGABRT`~~, ~~`SIGFPE`~~, `SIGBUS`, ~~`SIGQUIT`~~).

Noticed in rust-lang#137138 that we didn't print anything for `SIGILL`, so I though we could just handle more signals.

r? ````@workingjubilee```` since you last touched it
… r=tgross35

tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg

In rust-lang#136324 the doctest for `f16::erf()` was gated with `reliable_f16_math`. Add the same gate on `f16::erfc()` to avoid:

    rust_out.71e2e529d20ea47d-cgu.0:\
    (.text._ZN8rust_out4main43_doctest_main_library_std_src_f16_rs_1321_017h485f3ffe6bf2a981E+0x38): \
    undefined reference to `__gnu_h2f_ieee'

on MIPS (and maybe other architectures).

r? tgross35
…rom-cg-clif, r=bjorn3

cg_clif: use exclusively ABI alignment

This will minimize possible conflict with future updates to AbiAndPrefAlign that may remove some fields. It is also almost a bug to consider them.

r? `@bjorn3`
…r=saethlin

Enforce T: Hash for Interned<...>

This adds panicking Hash impls for several resolver types that don't actually satisfy this condition. It's not obvious to me that rustc_resolve actually upholds the Interned guarantees but fixing that seems pretty hard (the structures have at minimum some interior mutability, so it's not really recursively hashable in place...). FIXME comments as such on those impls.

cc rust-lang#137196 (comment)

r? `@saethlin`
…ll, r=alexcrichton

Remove `std::os::wasi::fs::FileExt::tell`

Following rust-lang#137165 (Use `tell` for `<File as Seek>::stream_position`), `tell` is now directly exposed via `stream_position`, making `<File as FileExt>::tell` redundant. Remove it.

`std::os::wasi::fs::FileExt::tell` is currently unstable and tracked in rust-lang#71213.

`@rustbot` ping wasi
…compiler-errors

don't ICE for alias-relate goals with error term

see comment, fixes rust-lang/trait-system-refactor-initiative#165

r? `@compiler-errors`
…x, r=compiler-errors

Remove `rustc_middle::mir::tcx` module.

This is a really weird module. For example, what does `tcx` in `rustc_middle::mir::tcx::PlaceTy` mean? The answer is "not much".

The top-level module comment says:

> Methods for the various MIR types. These are intended for use after
> building is complete.

Awfully broad for a module that has a handful of impl blocks for some MIR types, none of which really relates to `TyCtxt`. `git blame` indicates the comment is ancient, from 2015, and made sense then.

This module is now vestigial. This commit removes it and moves all the code within into `rustc_middle::mir::statement`. Some specifics:

- `Place`, `PlaceRef`, `Rvalue`, `Operand`, `BorrowKind`: they all have `impl` blocks in both the `tcx` and `statement` modules. The commit merges the former into the latter.

- `BinOp`, `UnOp`: they only have `impl` blocks in `tcx`. The commit moves these into `statement`.

- `PlaceTy`, `RvalueInitializationState`: they are defined in `tcx`. This commit moves them into `statement` *and* makes them available in `mir::*`, like many other MIR types.

r? `@tmandry`
…=compiler-errors

add last std diagnostic items for clippy

Part of rust-lang/rust-clippy#5393.
Add diagnostic item attributes to the items in `std` and `core` where clippy currently uses hardcoded paths (https://github.com/rust-lang/rust-clippy/blob/master/clippy_utils/src/paths.rs).
…iler-errors

Remove scrutinee_hir_id from ExprKind::Match

It is unused.
@rustbot rustbot added O-wasi Operating system: Wasi, Webassembly System Interface 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Feb 18, 2025
@Urgau
Copy link
Member Author

Urgau commented Feb 18, 2025

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Feb 18, 2025

📌 Commit 2f81c1e has been approved by Urgau

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 Feb 18, 2025
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_ty_utils v0.0.0 (/checkout/compiler/rustc_ty_utils)
    Checking rustc_mir_build v0.0.0 (/checkout/compiler/rustc_mir_build)
    Checking rustc_privacy v0.0.0 (/checkout/compiler/rustc_privacy)
    Checking rustc_hir_analysis v0.0.0 (/checkout/compiler/rustc_hir_analysis)
error: unresolved link to `super::tcx::PlaceTy`
     |
     |
1136 | ///  3. The type of the place and an optional variant index. See [`PlaceTy`][super::tcx::PlaceTy].
     |                                                                              ^^^^^^^^^^^^^^^^^^^ no item named `tcx` in module `mir`
     = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`

    Checking rustc_codegen_ssa v0.0.0 (/checkout/compiler/rustc_codegen_ssa)
    Checking rustc_codegen_ssa v0.0.0 (/checkout/compiler/rustc_codegen_ssa)
error: could not document `rustc_middle`
warning: build failed, waiting for other jobs to finish...
Command has failed. Rerun with -v to see more details.
  local time: Tue Feb 18 16:52:27 UTC 2025
  network time: Tue, 18 Feb 2025 16:52:27 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Contributor

bors commented Feb 18, 2025

⌛ Testing commit 2f81c1e with merge 4e243bb...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#137151 (Install more signal stack trace handlers)
 - rust-lang#137167 (tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg)
 - rust-lang#137195 (cg_clif: use exclusively ABI alignment)
 - rust-lang#137202 (Enforce T: Hash for Interned<...>)
 - rust-lang#137205 (Remove `std::os::wasi::fs::FileExt::tell`)
 - rust-lang#137211 (don't ICE for alias-relate goals with error term)
 - rust-lang#137213 (Remove `rustc_middle::mir::tcx` module.)
 - rust-lang#137214 (add last std diagnostic items for clippy)
 - rust-lang#137221 (Remove scrutinee_hir_id from ExprKind::Match)

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

Urgau commented Feb 18, 2025

@bors r-

@Urgau Urgau closed this Feb 18, 2025
@Urgau Urgau reopened this Feb 18, 2025
@Urgau
Copy link
Member Author

Urgau commented Feb 18, 2025

@bors r- retry

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 18, 2025
@Urgau Urgau closed this Feb 18, 2025
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_codegen_ssa v0.0.0 (/checkout/compiler/rustc_codegen_ssa)
error: unresolved link to `super::tcx::PlaceTy`
    --> compiler/rustc_middle/src/mir/syntax.rs:1136:78
     |
1136 | ///  3. The type of the place and an optional variant index. See [`PlaceTy`][super::tcx::PlaceTy].
     |                                                                              ^^^^^^^^^^^^^^^^^^^ no item named `tcx` in module `mir`
     = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`

error: could not document `rustc_middle`
error: could not document `rustc_middle`
warning: build failed, waiting for other jobs to finish...
Command has failed. Rerun with -v to see more details.
  local time: Tue Feb 18 17:54:52 UTC 2025
  network time: Tue, 18 Feb 2025 17:54:52 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-wasi Operating system: Wasi, Webassembly System Interface rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.