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 11 pull requests #135519

Merged
merged 26 commits into from
Jan 15, 2025
Merged

Rollup of 11 pull requests #135519

merged 26 commits into from
Jan 15, 2025

Conversation

workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 26 commits January 8, 2025 00:28
this also makes the rust.docs-minification option work
as advertised in config.toml

nothing fancy this time, this is intended to be perma-unstable.
it's only really here for the benefit of rustdoc devs.

mitegates rust-lang#135345
Clang will not respect this value in cross configurations.
A clone-like function in a function that takes as an argument the type
that it returns.

However, functions that return a type variable are not counted as
clone-line. Because we're not unifying the whole function at once,
a function like `U -> T` would otherwise be counted as "clone-like"
because the generics will just unify with anything when done seperatly.

Co-authored-by: Michael Howell <[email protected]>
bootstrap: do not rely on LIBRARY_PATH env variable

Closes rust-lang#134811

try-job: test-various
try-job: armhf-gnu
try-job: x86_64-apple-1
try-job: x86_64-apple-2
try-job: aarch64-apple
try-job: x86_64-msvc
try-job: i686-msvc
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
try-job: i686-mingw
Make sure to scrape region constraints from deeply normalizing type outlives assumptions in borrowck

Otherwise we're just randomly registering these region relations into the infcx which isn't good

r? lcnr
…atch, r=BoxyUwU

Improve `DispatchFromDyn` and `CoerceUnsized` impl validation

* Disallow arbitrary 1-ZST fields in `DispatchFromDyn` -- only `PhantomData`, and 1-ZSTs that mention no params (which is needed to support, e.g., the `Global` alloctor in `Box<T, U = Global>`).
* Don't allow coercing between non-ZSTs to ZSTs (since the previous check wasn't actually checking the field tys were the same before checking the layout...)
* Normalize the field before checking it's `PhantomData`.

Fixes rust-lang#135215
Fixes rust-lang#135214
Fixes rust-lang#135220

r? ```@BoxyUwU``` or reassign
…rrors, r=oli-obk

Consider more erroneous layouts as `LayoutError::ReferencesError` to suppress spurious errors

Fixes rust-lang#135208

r? oli-obk
…-sort-134935, r=notriddle

for purely return-type based searches, deprioritize clone-like functions

closes rust-lang#134935
…ication, r=notriddle

re-add --disable-minification to rustdoc

this also makes the rust.docs-minification option work as advertised in config.toml

nothing fancy this time, this is intended to be perma-unstable. it's only really here for the benefit of rustdoc devs.

mitegates rust-lang#135345

It was removed in rust-lang@f9e1f6f.
…r=lcnr

Make sure we can produce `ConstArgHasWrongType` errors for valtree consts

I forgot about `ty::ConstKind::Value` in rust-lang#134771.

The error message here could use some work -- both in the new trait solver and the old trait solver. But unrelated to the issue here.

Fixes rust-lang#135361 -- this was only ICEing in coherence because coherence uses the new trait solver, but I don't think the minimization is worth committing compared to the test I added.

r? ```@lcnr``` or ```@BoxyUwU```
…t-syntactical, r=oli-obk,RalfJung

Enforce syntactical stability of const traits in HIR

This PR enforces what I'm calling *syntactical* const stability of traits. In other words, it enforces the ability to name `~const`/`const` traits in trait bounds in various syntax positions in HIR (including in the trait of an impl header). This functionality is analogous to the *regular* item stability checker, which is concerned with making sure that you cannot refer to unstable items by name, and is implemented as an extension of that pass.

This is separate from enforcing the *recursive* const stability of const trait methods, which is implemented in MIR and runs on MIR bodies. That will require adding a new `NonConstOp` to the const checker and probably adjusting some logic to deduplicate redundant errors.

However, this check is separate and necessary for making sure that users don't add `~const`/`const` bounds to items when the trait is not const-stable in the first place. I chose to separate enforcing recursive const stability out of this PR to make it easier to review. I'll probably open a follow-up following this one, blocked on this PR.

r? `@RalfJung` cc `@rust-lang/project-const-traits`
…const, r=RalfJung

Do not consider traits that have unsatisfied const conditions to be conditionally const

This will improve error messages as we continue to constify traits, since we don't want to start calling things "conditionally const" if they aren't implemented with a const impl anyways.

The only case that this affects today is `Deref` since that's one of the only constified traits in the standard library :)

r? RalfJung
…e-133484, r=GuillaumeGomez

fix underlining of hovered intra-doc links.

fixes rust-lang#133484

i'm not sure how to create a test case for this, or if that is even possible.
Fix clippy lints in rustdoc

Some more clippy lint fixes.

r? `@notriddle`
@rustbot rustbot added 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) labels Jan 15, 2025
@rustbot rustbot added 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 Jan 15, 2025
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 15, 2025

📌 Commit 4f25a31 has been approved by workingjubilee

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 Jan 15, 2025
@bors
Copy link
Contributor

bors commented Jan 15, 2025

⌛ Testing commit 4f25a31 with merge 00ded39014a4a9cab60d1819a832c2888415e5f9...

@bors
Copy link
Contributor

bors commented Jan 15, 2025

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing 00ded39 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 15, 2025
@bors bors merged commit 00ded39 into rust-lang:master Jan 15, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 15, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#134913 bootstrap: do not rely on LIBRARY_PATH env variable 8b65e00dcb6acb9f26c2cec34dc726352110382d (link)
#134940 Make sure to scrape region constraints from deeply normaliz… febde03cb545490d5d11dcf8a8282d0faf3be15b (link)
#135228 Improve DispatchFromDyn and CoerceUnsized impl validati… 600c38dbbcedeedab51cbd6394c4b6545e98160a (link)
#135264 Consider more erroneous layouts as `LayoutError::References… c6b2d0fa252a02bfeb6f9978e065d8bcb7ffe639 (link)
#135302 for purely return-type based searches, deprioritize clone-l… 4c0a0c29da3cc9f7aab1e2e5a3b114d76d9cbb3e (link)
#135353 re-add --disable-minification to rustdoc 961af9b4fb341f89cba9b3e6ca26fe381c5d5f68 (link)
#135380 Make sure we can produce ConstArgHasWrongType errors for … 7bedca775bc8891cbe06989177e56346f877b785 (link)
#135423 Enforce syntactical stability of const traits in HIR 007ab2a2afabbb694969a3def6ad6b1662da28d3 (link)
#135425 Do not consider traits that have unsatisfied const conditio… 8ff29a576e24657b4dbadf13612b9f008cf35569 (link)
#135499 fix underlining of hovered intra-doc links. 3f3709090a595a2b6ad6fe63f715552200a12be2 (link)
#135505 Fix clippy lints in rustdoc 5d13f792cfab5ca64bb7744d7a126c5fcba93bc2 (link)

previous master: 93ba568ab9

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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-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.

8 participants