Skip to content

Rollup of 18 pull requests #145204

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

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Aug 10, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jyn514 and others added 30 commits May 26, 2025 20:22
This uses a very hacky regex that will probably miss some variables. But
having some docs seems better than none at all.

This uses a very hacky regex that will probably miss some variables. But having some docs seems better than none at all.

In particular, this generates stubs for the following env vars:

- COLORTERM
- QNX_TARGET
- RUST_BACKTRACE
- RUSTC_BLESS
- RUSTC_BOOTSTRAP
- RUSTC_BREAK_ON_ICE
- RUSTC_CTFE_BACKTRACE
- RUSTC_FORCE_RUSTC_VERSION
- RUSTC_GRAPHVIZ_FONT
- RUSTC_ICE
- RUSTC_LOG
- RUSTC_OVERRIDE_VERSION_STRING
- RUSTC_RETRY_LINKER_ON_SEGFAULT
- RUSTC_TRANSLATION_NO_DEBUG_ASSERT
- RUST_DEP_GRAPH_FILTER
- RUST_DEP_GRAPH
- RUST_FORBID_DEP_GRAPH_EDGE
- RUST_MIN_STACK
- RUST_TARGET_PATH
- SDKROOT
- TERM
- UNSTABLE_RUSTDOC_TEST_LINE
- UNSTABLE_RUSTDOC_TEST_PATH

[rendered](![screenshot of unstable-book running locally, with 14 environment variables shown in the sidebar](https://github.com/user-attachments/assets/8238d094-fb7a-456f-ad43-7c07aa2c44dd))
The suboptimal error only appears with NLLs due to liveness differences
where polonius cannot have as many boring locals. Sometimes this causes
NLLs to emit a duplicate error as well.
Remove incomplete handling of kills during traversal for loan liveness
to get to a simpler and actionable prototype.

This handles the cases, on sufficiently simple examples, that were
deferred from NLLs (NLL problem case 3, lending iterators), and is still
a good step to put in people's hands without needing to wait for another
full implementation. This is a practical cut in scope, but it also
shows where are the areas of improvement, that we will explore in the
future.
These are just some sanity checks to ensure NLLs, the polonius alpha
analysis, and the datalog implementation behave the same on these common
examples.
This test showcases the same imprecision as NLLs, unlike the datalog
implementation, when using reachability as a liveness approximation.
This is an example similar to the linked-list cursor examples
where the alpha shows the same imprecision as NLLs, but that can work due to
the loans not being live after the loop, or the constraint graph being
simple enough that the cfg/subset relationships are the same for
reachability and liveness.
- linked-list cursor-like patterns
- issue-46589

These are known-bugs for the polonius alpha, where they show the same
imprecision as NLLs, but are supported by the old datalog
implementation.
also add a note to `GenericArgs::truncate_to`
some clauses can be merged together without requiring an attribute for
each trait derived.

also manually impl `Eq` because the `derive_where` generated code is too
much for my comfort
Co-authored-by: Florian Bartels <[email protected]>
Co-authored-by: Mads Marquart <[email protected]>
This (poorly named) target option controls whether or not cdylibs will
export mangled rust symbols rather than just unmangled symbols.
Presumably at some point in the past support for this wasn't implemented
yet for Solaris, but cg_ssa::back::linker does have handling for this on
Solaris now. And one of the Solaris target maintainers confirmed that
building Rust with this option enabled works fine for them on Solaris.
rustdoc has its own issue template now, mention that.

swap the order of the last two sentances so it reads more like
a typical if/else chain (base case listed last).

adjust some labels and descriptions
Every other feature in the list uses a doc comment; fix one that used a
regular comment to use a doc comment.
unstable-book: Add stubs for environment variables; document some of the important ones

This uses a very hacky regex that will probably miss some variables. But having some docs seems better than none at all.

In particular, this documents the following env vars explicitly (cc `````@madsmtm````` `````@flba-eb````` - do the docs for SDKROOT and QNX_TARGET look right?):

- COLORTERM
- QNX_TARGET
- SDKROOT
- TERM

and generates stubs for the following env vars:

- RUST_BACKTRACE
- RUSTC_BLESS
- RUSTC_BREAK_ON_ICE
- RUSTC_CTFE_BACKTRACE
- RUSTC_FORCE_RUSTC_VERSION
- RUSTC_GRAPHVIZ_FONT
- RUSTC_ICE
- RUSTC_LOG
- RUSTC_RETRY_LINKER_ON_SEGFAULT
- RUSTC_TRANSLATION_NO_DEBUG_ASSERT
- RUST_DEP_GRAPH_FILTER
- RUST_DEP_GRAPH
- RUST_FORBID_DEP_GRAPH_EDGE
- RUST_MIN_STACK
- RUST_TARGET_PATH
- UNSTABLE_RUSTDOC_TEST_LINE
- UNSTABLE_RUSTDOC_TEST_PATH

rendered: ![screenshot of unstable-book running locally, with 14 environment variables shown in the sidebar](https://github.com/user-attachments/assets/8238d094-fb7a-456f-ad43-7c07aa2c44dd)
…comment, r=lqd

Fix an unstable feature comment that wasn't a doc comment

Every other feature in the list uses a doc comment; fix one that used a regular comment to use a doc comment.
… r=compiler-errors

`suggest_borrow_generic_arg`: use the correct generic args

The suggestion now gets calls' generic arguments from the callee's type to handle cases where the callee isn't an identifier expression. Fixes rust-lang#145164.
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool PG-exploit-mitigations Project group: Exploit mitigations 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Aug 10, 2025
@Zalathar
Copy link
Contributor Author

Remainder of #145197.

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 10, 2025

📌 Commit 7e3c18d 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 10, 2025
@bors
Copy link
Collaborator

bors commented Aug 10, 2025

⌛ Testing commit 7e3c18d with merge b6f3e72...

bors added a commit that referenced this pull request Aug 10, 2025
Rollup of 18 pull requests

Successful merges:

 - #141624 (unstable-book: Add stubs for environment variables; document some of the important ones)
 - #143093 (Simplify polonius location-sensitive analysis)
 - #144402 (Stabilize loongarch32 inline asm)
 - #144403 (`tests/ui/issues/`: The Issues Strike Back [4/N])
 - #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc)
 - #145089 (Improve error output when a command fails in bootstrap)
 - #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC)
 - #145129 ([win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC)
 - #145130 (improve "Documentation problem" issue template.)
 - #145135 (Stabilize `duration_constructors_lite` feature)
 - #145145 (some `derive_more` refactors)
 - #145147 (rename `TraitRef::from_method` to `from_assoc`)
 - #145156 (Override custom Cargo `build-dir` in bootstrap)
 - #145160 (Change days-threshold to 28 in [behind-upstream])
 - #145162 (`{BTree,Hash}Map`: add "`Entry` API" section heading)
 - #145175 (Enable limit_rdylib_exports on Solaris)
 - #145187 (Fix an unstable feature comment that wasn't a doc comment)
 - #145191 (`suggest_borrow_generic_arg`: use the correct generic args)

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

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

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] gimli test:false 4.327
[RUSTC-TIMING] object test:false 5.683
error: linking with `sparcv9-solaris-gcc` failed: exit status: 1
  |
  = note:  "sparcv9-solaris-gcc" "-Wl,-M" "-Wl,/tmp/rustcCdZiIW/list" "-m64" "/tmp/rustcCdZiIW/symbols.o" "<1 object files omitted>" "/tmp/rustcCdZiIW/rmeta.o" "<1 object files omitted>" "-Wl,-z,ignore" "-Wl,-Bdynamic" "-lsocket" "-lposix4" "-lpthread" "-lresolv" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/sparcv9-sun-solaris/release/deps/{libpanic_unwind-576066aea71040b7,libobject-42de11fbaba8a6f0,libmemchr-1269b5819ad29d5f,libaddr2line-ffa399e8d33a727a,libgimli-7718c281d3f7ddfe,librustc_demangle-18d5e4a68e177ea3,libstd_detect-a9f0a5ddeb619a4a,libhashbrown-7335bdf04caedc95,librustc_std_workspace_alloc-8b303960f4369ed2,libminiz_oxide-244fbf42d1952c98,libadler2-fdef1fc9ab9a4e63,libunwind-147d300e73828b63,libcfg_if-77b8b4f011955e2d,liblibc-3a8e43a40000b5f2,librustc_std_workspace_core-089abc0fb4aa3ed2,liballoc-cb97d4135d2d8cba,libcore-2b2fea2b0a75a66f,libcompiler_builtins-a2eaffc63113988a}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lsendfile" "-llgrp" "-L" "/tmp/rustcCdZiIW/raw-dylibs" "-L" "<sysroot>-std/sparcv9-sun-solaris/release/build/compiler_builtins-8df8598ce8895c14/out" "-o" "<sysroot>-std/sparcv9-sun-solaris/release/deps/libstd-db8c12fe786efb99.so" "-shared" "-Wl,-soname=libstd-db8c12fe786efb99.so" "-nodefaultlibs" "-Wl,-z,origin" "-Wl,-rpath,$ORIGIN/../lib"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: /opt/solaris/sparcv9/lib/gcc/sparcv9-pc-solaris2.11/8.4.0/../../../../sparcv9-pc-solaris2.11/bin/ld: warning: -z ignore ignored
          /opt/solaris/sparcv9/lib/gcc/sparcv9-pc-solaris2.11/8.4.0/../../../../sparcv9-pc-solaris2.11/bin/ld:/tmp/rustcCdZiIW/list: file format not recognized; treating as linker script
          /opt/solaris/sparcv9/lib/gcc/sparcv9-pc-solaris2.11/8.4.0/../../../../sparcv9-pc-solaris2.11/bin/ld:/tmp/rustcCdZiIW/list:1: syntax error
          collect2: error: ld returned 1 exit status
          

[RUSTC-TIMING] std test:false 14.175
error: could not compile `std` (lib) due to 1 previous error

@bors
Copy link
Collaborator

bors commented Aug 10, 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 10, 2025
@Zalathar Zalathar closed this Aug 10, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2025
@Zalathar Zalathar deleted the rollup-eyrrf5y branch August 10, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup 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. 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.