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 8 pull requests #136481

Merged
merged 18 commits into from
Feb 3, 2025
Merged

Rollup of 8 pull requests #136481

merged 18 commits into from
Feb 3, 2025

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Feb 3, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jieyouxu and others added 18 commits February 2, 2025 22:04
`TypeFoldable` does, because it involves the production of new values.
But `TypeVisitable` only involves the visiting of values.
Some of these were never necessary, and some were facilitated by the
previous commit.
All hooks receive a `TyCtxtAt` argument.

Currently hooks can be called through `TyCtxtAt` or `TyCtxt`. In the
latter case, a `TyCtxtAt` is constructed with a dummy span and passed to
the hook.

However, in practice hooks are never called through `TyCtxtAt`, and
always receive a dummy span. (I confirmed this via code inspection, and
double-checked it by temporarily making the `TyCtxtAt` code path panic
and running all the tests.)

This commit removes all the `TyCtxtAt` machinery for hooks. All hooks
now receive `TyCtxt` instead of `TyCtxtAt`. There are two existing hooks
that use `TyCtxtAt::span`: `const_caller_location_provider` and
`try_destructure_mir_constant_for_user_output`. For both hooks the span
is always a dummy span, probably unintentionally. This dummy span use is
now explicit. If a non-dummy span is needed for these two hooks it would
be easy to add it as an extra argument because hooks are less
constrained than queries.
Docs for f16 and f128: correct a typo and add details

CC: rust-lang#116909; corrects and expands rust-lang#124750.
…-past, r=Noratrieb,jieyouxu

Remove a footgun-y feature / relic of the past from the compiletest DSL

The compiletest DSL still features a historical remnant from the time when its directives were merely prefixed with `//` instead of `//`@`` when unknown directive names weren't rejected since they could just as well be part of prose:

As an "optimization", it stops looking for directives once it stumbles upon a line which starts with either `fn` or `mod`. This is super footgun-y as it obviously leads to any seeming compiletest directives below `fn` and `mod` items getting completely ignored.

See rust-lang#136403 for a practical example. As well the assembly test updated in this PR.

~~Blocked on rust-lang#136403.~~ (merged)
…compiler-errors

LTA: Actually check where-clauses for well-formedness at the def site

All of the added tests used to wrongfully pass.

r? oli-obk or types/compiler or reassign
…oli-obk

miri: improve error when offset_from preconditions are violated

Fixes rust-lang/miri#4143
…piler-errors

[`compiletest`-related cleanups 1/7] Cleanup `is_rustdoc` logic and remove a useless path join in rustdoc-json runtest logic

Reference for overall changes: rust-lang#136437
Part **1** of **7** of the *`compiletest`-related cleanups* PR series.

### Summary

- Don't match on path when we already have test suite names.
- Remove a useless path join.

r? bootstrap (or compiler)
…-errors

Remove some `Clone` bounds and derives.

r? `@cjgillot`
… r=oli-obk

Remove hook calling via `TyCtxtAt`.

All hooks receive a `TyCtxtAt` argument.

Currently hooks can be called through `TyCtxtAt` or `TyCtxt`. In the latter case, a `TyCtxtAt` is constructed with a dummy span and passed to the hook.

However, in practice hooks are never called through `TyCtxtAt`, and always receive a dummy span. (I confirmed this via code inspection, and double-checked it by temporarily making the `TyCtxtAt` code path panic and running all the tests.)

This commit removes all the `TyCtxtAt` machinery for hooks. All hooks now receive `TyCtxt` instead of `TyCtxtAt`. There are two existing hooks that use `TyCtxtAt::span`: `const_caller_location_provider` and `try_destructure_mir_constant_for_user_output`. For both hooks the span is always a dummy span, probably unintentionally. This dummy span use is now explicit. If a non-dummy span is needed for these two hooks it would be easy to add it as an extra argument because hooks are less constrained than queries.

r? `@oli-obk`
…e-on-tarballs, r=jieyouxu

override default config profile on tarballs

This is the same logic used in the Python script https://github.com/rust-lang/rust/blob/613bdd49978298648ed05ace086bd1ecad54b44a/src/bootstrap/bootstrap.py#L1273-L1274
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Feb 3, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Feb 3, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 3, 2025

📌 Commit f65c6af 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 Feb 3, 2025
@bors
Copy link
Contributor

bors commented Feb 3, 2025

⌛ Testing commit f65c6af with merge 534d79a...

@bors
Copy link
Contributor

bors commented Feb 3, 2025

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 534d79a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 3, 2025
@bors bors merged commit 534d79a into rust-lang:master Feb 3, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 3, 2025
@jieyouxu jieyouxu deleted the rollup-w0lnnqb branch February 3, 2025 19:50
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#136356 Docs for f16 and f128: correct a typo and add details 560c0215785473716b55f19ad52f7d118ae8958f (link)
#136404 Remove a footgun-y feature / relic of the past from the com… e6a74d35ef93766a2cb5c0a3f7297aae71b57b5e (link)
#136432 LTA: Actually check where-clauses for well-formedness at th… acf4a49dc3730c7a0ebeb3584401a2b9ca972d8d (link)
#136438 miri: improve error when offset_from preconditions are viol… 841bd6128a7c0f24fe2ea5d2c477583e891a57b7 (link)
#136441 [compiletest-related cleanups 1/7] Cleanup is_rustdoc l… 9a2018f444b04a6274839ccc078be3b656faf18e (link)
#136455 Remove some Clone bounds and derives. 574315ba59bcf59012ec9d3c233f25e97c8dc3ca (link)
#136464 Remove hook calling via TyCtxtAt. 12b4fc56954b8ba5419c90453dcc1828d00ca7ad (link)
#136467 override default config profile on tarballs d3b19092ff78e97c58e27430ca11fe2b11f7f11b (link)

previous master: f2c4ccd852

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (534d79a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -4.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.1% [-4.1%, -4.1%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 777.679s -> 779.425s (0.22%)
Artifact size: 328.83 MiB -> 328.79 MiB (-0.01%)

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-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants