Skip to content

Rollup of 21 pull requests #144995

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

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Aug 6, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jogru0 and others added 30 commits April 24, 2025 21:14
Add target features for sm_* and ptx*, both of which form a partial
order, but cannot be combined to a single partial order. These mirror
the LLVM target features, but we do not provide LLVM target
processors (which imply both an sm_* and ptx* feature).

Add some documentation for the nvptx target.
Normally LLVM and rustc agree about what features are implied by
target-cpu, but for NVPTX, LLVM considers sm_* and ptx* features to be
exclusive, which makes sense for codegen purposes. But in Rust, we want
to think of them as:

  sm_{sver} means that the target supports the hardware features of sver

  ptx{pver} means the driver supports PTX ISA pver

Intrinsics usually require a minimum sm_{sver} and ptx{pver}.

Prior to this commit, -Ctarget-cpu=sm_70 would activate only sm_70 and
ptx60 (the minimum PTX version that supports sm_70, which maximizes
driver compatibility). With this commit, it also activates all the
implied target features (sm_20, ..., sm_62; ptx32, ..., ptx50).
This is already warn-by-default, and a future compatibility warning
(FCW) that warns in dependencies. Upgrade it to deny-by-default, as the
next step towards hard error.
With this macro we only need to enumerate every variant once. This saves
a lot of duplication already between the definition, the `FromStr` impl
and the `ToJson` impl.

It also enables us to do further things with it like JSON schema
generation.
Co-authored-by: Tshepang Mbambo <[email protected]>
We noticed when building rustc multiple time in a roll, some files
will not be consistent across the build despite the fact that they
are built from same source under the same environment. This patch
addresses the inconsistency issue we found on libunwind.a by sorting
the order of the files passed to the linker.
This schema is helpful for people writing custom target spec JSON. It
can provide autocomplete in the editor, and also serves as documentation
when there are documentation comments on the structs, as `schemars` will
put them in the schema.
Currently the Args new function is scope constrained to pub(super) but this stops me from being able to construct Args structs in unit tests.
Make suggestions to remove params and super traits tool-only, and make
the suggestion span more accurate.

```
error[E0567]: auto traits cannot have generic parameters
  --> $DIR/auto-trait-validation.rs:6:19
   |
LL | auto trait Generic<T> {}
   |            -------^^^
   |            |
   |            auto trait cannot have generic parameters

error[E0568]: auto traits cannot have super traits or lifetime bounds
  --> $DIR/auto-trait-validation.rs:8:20
   |
LL | auto trait Bound : Copy {}
   |            -----   ^^^^
   |            |
   |            auto traits cannot have super traits or lifetime bounds
```

```
error[E0380]: auto traits cannot have associated items
  --> $DIR/issue-23080.rs:5:8
   |
LL | unsafe auto trait Trait {
   |                   ----- auto traits cannot have associated items
LL |     fn method(&self) {
   |        ^^^^^^
```
Make sure that compiler and linker don't optimize the section's contents
away by adding the global holding the data to "llvm.used". The volatile
load in the main shim is retained because "llvm.used", which translates
to SHF_GNU_RETAIN on ELF targets, requires a reasonably recent linker;
emitting the volatile load ensures compatibility with older linkers, at
least when libstd is used.

Pretty printers in dylib dependencies are now emitted by the main crate
instead of the dylib; apart from matching how rlibs are handled, this
approach has the advantage that `omit_gdb_pretty_printer_section` keeps
working with dylib dependencies.
Instead of collecting pretty printers transitively when building
executables/staticlibs/cdylibs, let the debugger find each crate's
pretty printers via its .debug_gdb_scripts section. This covers the case
where libraries defining custom pretty printers are loaded dynamically.
@Zalathar
Copy link
Contributor Author

Zalathar commented Aug 6, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 6, 2025

📌 Commit c89b0b4 has been approved by Zalathar

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 Aug 6, 2025
@bors
Copy link
Collaborator

bors commented Aug 6, 2025

⌛ Testing commit c89b0b4 with merge 759ba6a...

bors added a commit that referenced this pull request Aug 6, 2025
Rollup of 21 pull requests

Successful merges:

 - #137831 (Tweak auto trait errors)
 - #138689 (add nvptx_target_feature)
 - #140267 (implement continue_ok and break_ok for ControlFlow)
 - #143679 (Preserve the .debug_gdb_scripts section)
 - #143857 (Port #[macro_export] to the new attribute parsing infrastructure)
 - #143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps)
 - #144133 (Stabilize const TypeId::of)
 - #144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - #144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - #144498 (Add --print target-spec-json-schema)
 - #144552 (Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`)
 - #144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - #144676 (Add documentation for unstable_feature_bound)
 - #144794 (Port `#[coroutine]` to the new attribute system)
 - #144835 (Anonymize binders in tail call sig)
 - #144836 (Change visibility of Args new function)
 - #144861 (Stabilize `panic_payload_as_str` feature)
 - #144910 (Add regression tests for seemingly fixed issues)
 - #144913 ([rustdoc] Fix wrong `i` tooltip icon)
 - #144917 (Enforce tail call type is related to body return type in borrowck)
 - #144924 (compiletest: add hint for when a ui test produces no errors)

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

The job dist-ohos-x86_64 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING] core::build_steps::tool::ToolBuild { build_compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: true }, target: x86_64-unknown-linux-ohos, tool: "rust-analyzer-proc-macro-srv", path: "src/tools/rust-analyzer/crates/proc-macro-srv-cli", mode: ToolRustc, source_type: InTree, extra_features: ["in-rust-tree"], allow_features: "rustc_private,proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink,proc_macro_def_site", cargo_args: [], artifact_kind: Binary } -- 61.343
[TIMING] core::build_steps::tool::RustAnalyzerProcMacroSrv { compilers: RustcPrivateCompilers { build_compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: true }, target_compiler: Compiler { stage: 2, host: x86_64-unknown-linux-ohos, forced_compiler: false } } } -- 0.000
[TIMING] core::build_steps::dist::DebuggerScripts { sysroot: "/checkout/obj/build/tmp/tarball/rustc/x86_64-unknown-linux-ohos/image", host: x86_64-unknown-linux-ohos } -- 0.002
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:38:18
  local time: Wed Aug  6 13:00:24 UTC 2025
  network time: Wed, 06 Aug 2025 13:00:24 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Collaborator

bors commented Aug 6, 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 Aug 6, 2025
@Zalathar
Copy link
Contributor Author

Zalathar commented Aug 6, 2025

I can't see any useful information in the failure log, so I have no way to identify a likely cause.

@Zalathar
Copy link
Contributor Author

Zalathar commented Aug 6, 2025

Let's see if this is even reproducible:

@bors try jobs=dist-ohos-x86_64

@rust-bors
Copy link

rust-bors bot commented Aug 6, 2025

⌛ Trying commit c89b0b4 with merge 17a436c

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Aug 6, 2025
Rollup of 21 pull requests

try-job: dist-ohos-x86_64
@rust-bors
Copy link

rust-bors bot commented Aug 6, 2025

💔 Test failed (CI). Failed jobs:

@rust-log-analyzer
Copy link
Collaborator

The job dist-ohos-x86_64 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING] core::build_steps::tool::ToolBuild { build_compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: true }, target: x86_64-unknown-linux-ohos, tool: "rust-analyzer-proc-macro-srv", path: "src/tools/rust-analyzer/crates/proc-macro-srv-cli", mode: ToolRustc, source_type: InTree, extra_features: ["in-rust-tree"], allow_features: "rustc_private,proc_macro_internals,proc_macro_diagnostic,proc_macro_span,proc_macro_span_shrink,proc_macro_def_site", cargo_args: [], artifact_kind: Binary } -- 63.050
[TIMING] core::build_steps::tool::RustAnalyzerProcMacroSrv { compilers: RustcPrivateCompilers { build_compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: true }, target_compiler: Compiler { stage: 2, host: x86_64-unknown-linux-ohos, forced_compiler: false } } } -- 0.000
[TIMING] core::build_steps::dist::DebuggerScripts { sysroot: "/checkout/obj/build/tmp/tarball/rustc/x86_64-unknown-linux-ohos/image", host: x86_64-unknown-linux-ohos } -- 0.003
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:46:20
  local time: Wed Aug  6 14:39:10 UTC 2025
  network time: Wed, 06 Aug 2025 14:39:10 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@Zalathar
Copy link
Contributor Author

Zalathar commented Aug 7, 2025

The cause seems to have been #144498.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. 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.