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 #134395

Merged
merged 50 commits into from
Dec 16, 2024
Merged

Rollup of 9 pull requests #134395

merged 50 commits into from
Dec 16, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

MarcoIeni and others added 30 commits December 10, 2024 13:14
…reversed'

My intuition for 'mirrored' is that it means 'flipped' or 'reversed'.
Clarify that that is not what is meant to 'mirror' the THIR from the
HIR.
While normal generics can be skipped in this case, no-names need
something to show here.

Before: `TyCtxt, , Symbol -> bool`

After: `TyCtxt, Into<DefId>, Symbol -> bool`
When we recover from a pattern parse error, or a pattern uses `..`, we keep track of that and affect resolution error for missing bindings that could have been provided by that pattern. We differentiate between `..` and parse recovery. We silence resolution errors likely caused by the pattern parse error.

```
error[E0425]: cannot find value `title` in this scope
  --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:19:30
   |
LL |         println!("[{}]({})", title, url);
   |                              ^^^^^ not found in this scope
   |
note: `Website` has a field `title` which could have been included in this pattern, but it wasn't
  --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:17:12
   |
LL | / struct Website {
LL | |     url: String,
LL | |     title: Option<String> ,
   | |     ----- defined here
LL | | }
   | |_-
...
LL |       if let Website { url, .. } = website {
   |              ^^^^^^^^^^^^^^^^^^^ this pattern doesn't include `title`, which is available in `Website`
```

Fix rust-lang#74863.
CI: use free runners for x86_64-gnu-llvm jobs

try-job: x86_64-gnu-llvm-19-1
try-job: x86_64-gnu-llvm-19-2
try-job: x86_64-gnu-llvm-19-3
try-job: x86_64-gnu-llvm-18-1
try-job: x86_64-gnu-llvm-18-2
try-job: x86_64-gnu-llvm-18-3
rustc_mir_build: Clarify that 'mirrored' does not mean 'flipped' or 'reversed'

My intuition for 'mirrored' is that it means 'flipped' or 'reversed'. Clarify that that is not what is meant to 'mirror' the THIR from the HIR.
…triddle

Correctly handle comments in attributes in doctests source code

Fixes rust-lang#134221.

The problem was that attributes are "inlined" (backlines are stripped), then when there is an inline comment inside it, the attribute is never considered valid (since unclosed). Fix was to simply put back backlines in case it's a multiline attribute.

r? ``@notriddle``
…=GuillaumeGomez

rustdoc-search: handle `impl Into<X>` better

This PR fixes two bugs I ran into while searching the compiler docs:

- It omitted an `impl Trait` entry in the type signature field, producing `TyCtxt, , Symbol -> bool`
- It didn't let me search for `TyCtxt, DefId, Symbol -> bool` even though that's a perfectly good description of the function I was looking for (the function actually used `impl Into<DefId>`

r? ``@GuillaumeGomez`` cc ``@lolbinarycat``
Keep track of patterns that could have introduced a binding, but didn't

When we recover from a pattern parse error, or a pattern uses `..`, we keep track of that and affect resolution error for missing bindings that could have been provided by that pattern. We differentiate between `..` and parse recovery. We silence resolution errors likely caused by the pattern parse error.

```
error[E0425]: cannot find value `title` in this scope
  --> $DIR/struct-pattern-with-missing-fields-resolve-error.rs:18:30
   |
LL |     if let Website { url, .. } = website {
   |            ------------------- this pattern doesn't include `title`, which is available in `Website`
LL |         println!("[{}]({})", title, url);
   |                              ^^^^^ not found in this scope
```

Fix rust-lang#74863.
…workingjubilee

reject unsound toggling of RISCV target features

~~Stacked on top of rust-lang#133417, only the last commit is new.~~

Works towards rust-lang#132618 (but more [remains to be done](rust-lang#134337 (comment)))
Part of rust-lang#116344

Cc ``@beetrees`` I hope I got everything.  I didn't do anything about "The f and zfinx features are incompatible" and that's not an ABI thing (right?) and I am not sure how to handle it with these ABI checks.
r? ``@workingjubilee``

Ideally we'd also reject target specs that disable the `f` feature but set an ABI that requires `f`... but I don't want to duplicate this logic. I have some ideas for how maybe the entire float ABI check logic should be different, now that we have some examples of what these ABI checks look like, but that will be a future PR.
Check for array lengths that aren't actually `usize`

I wish typeck wouldn't give us `ty::Array`s that have this problem in the first place, but we can check for it.

Fixes rust-lang#134352
cc ``@matthiaskrgr``
…r-errors

tests/ui/asm: Remove uses of rustc_attrs, lang_items, and decl_macro features by using minicore

Follow-up to rust-lang#132516 (comment).
This PR do similar things for remaining tests in tests/ui/asm.

r? jieyouxu
…ostic-cleanups, r=compiler-errors

Some trait method vs impl method signature difference diagnostic cleanups

Just some things I noticed while debugging a weird diagnostic in rust-lang#134353

best reviewed commit by commit
@rustbot rustbot added 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. rollup A PR which is a rollup labels Dec 16, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Dec 16, 2024

📌 Commit 9a0dab2 has been approved by matthiaskrgr

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 Dec 16, 2024
@bors
Copy link
Contributor

bors commented Dec 16, 2024

⌛ Testing commit 9a0dab2 with merge 6d9f6ae...

@bors
Copy link
Contributor

bors commented Dec 16, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 6d9f6ae to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 16, 2024
@bors bors merged commit 6d9f6ae into rust-lang:master Dec 16, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 16, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#134124 CI: use free runners for x86_64-gnu-llvm jobs f9be9bc28458ed9637b6f05692887f7899509b06 (link)
#134197 rustc_mir_build: Clarify that 'mirrored' does not mean 'fli… 381da02cbd353704192880fdeb9918a23268ad31 (link)
#134260 Correctly handle comments in attributes in doctests source … ed883d643e835a0b6073cd5cfb8598b125829151 (link)
#134277 rustdoc-search: handle impl Into<X> better d81191eef01e3cdf95bad50d5021e627a992f17a (link)
#134284 Keep track of patterns that could have introduced a binding… 16155543483c9e86236f419c40cdfc98312d19e9 (link)
#134337 reject unsound toggling of RISCV target features 2f71bb52e884c591b9bd00f36e08c5096e3cc511 (link)
#134371 Check for array lengths that aren't actually usize b8c98f5cfdd2d726eb1eca48354efa2e042541f2 (link)
#134385 tests/ui/asm: Remove uses of rustc_attrs, lang_items, and d… 04efbd779a3744117dfc4969649345e514d1af32 (link)
#134386 Some trait method vs impl method signature difference diagn… 23ab1a5362b915e3e6a8758cce0fd553dc3b7de3 (link)

previous master: 83ab648e00

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 (6d9f6ae): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.7%, -0.2%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 3.7%, secondary -2.8%)

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)
3.7% [3.5%, 3.9%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) 3.7% [3.5%, 3.9%] 2

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: 770.694s -> 771.96s (0.16%)
Artifact size: 332.93 MiB -> 332.99 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.