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 7 pull requests #109720

Merged
merged 17 commits into from
Mar 29, 2023
Merged

Rollup of 7 pull requests #109720

merged 17 commits into from
Mar 29, 2023

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

krasimirgg and others added 17 commits March 27, 2023 11:12
(Only the lifetime spans changed.)
These are internal features used for a specific purpose, and modules without imports are enough for that purpose.
As I've been trying to replace a `Vec` with an `IndexVec`, having `last` exist on both but returning very different types makes the transition a bit awkward -- the errors are later, where you get things like "there's no `ty` method on `mir::Field`" rather than a more localized error like "hey, there's no `last` on `IndexVec`".

So I propose renaming `last` to `last_index` to help distinguish `Vec::last`, which returns an element, and `IndexVec::last_index`, which returns an index.

(Similarly, `Iterator::last` also returns an element, not an index.)
…rs-rustdoc, r=GuillaumeGomez

rustdoc + rustdoc-json support for `feature(non_lifetime_binders)`

Makes `for<T> T: Trait` and `for<const N: usize> ..` in where clause operate correctly.

Fixes rust-lang#108158
…eGomez

rustdoc: Unsupport importing `doc(primitive)` and `doc(keyword)` modules

These are internal features used for a specific purpose, and modules without imports are enough for that purpose.
llvm-wrapper: adapt for LLVM API change

Adapts the wrapper for the LLVM commit llvm/llvm-project@377e131.

Found by the experimental rust + LLVM @ HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/18141#01872217-de22-4826-b0d6-2dd4884d8893
…an, r=oli-obk

Use span of placeholders in format_args!() expansion.

`format_args!("{}", x)` expands to something that contains `Argument::new_display(&x)`. That entire expression was generated with the span of `x`.

After this PR, `&x` uses the span of `x`, but the `new_display` call uses the span of the `{}` placeholder within the format string. If an implicitly captured argument was used like in `format_args!("{x}")`, both use the span of the `{x}` placeholder.

This fixes rust-lang#109576, and also allows for more improvements to similar diagnostics in the future, since the usage of `x` can now be traced to the exact `{}` placeholder that required it to be `Display` (or `Debug` etc.)
…r=lcnr

Check for overflow in `assemble_candidates_after_normalizing_self_ty`

Prevents a stack overflow (:warning: :exclamation:) in the new solver when we have param-env candidates that look like: `T: Trait<Assoc = <T as Trait>::Assoc>`

The current error message looks bad, but that's because we don't distinguish overflow and other ambiguity errors. I'll break that out into a separate PR since the fix may be controversial.

r? `@lcnr`
…rors

Fix mismatched punctuation in Debug impl of AttrId

I noticed this odd line in `ast-tree` output.

```console
$ echo '#[attr] struct S;' | rustc -Zunpretty=ast-tree -
```

```rust
...
            attrs: [
                Attribute {
                    kind: Normal(
                        NormalAttr {
                            item: AttrItem {
                                path: Path {
                                    segments: [
                                        PathSegment {
                                            ident: attr#0,
                                            args: None,
                                        },
                                    ],
                                    tokens: None,
                                },
                                args: Empty,
                            },
                        },
                    ),
                    id: AttrId(0)],      // <------
                    style: Outer,
                },
```
Rename `IndexVec::last` → `last_index`

As I've been trying to replace a `Vec` with an `IndexVec`, having `last` exist on both but returning very different types makes the transition a bit awkward -- the errors are later, where you get things like "there's no `ty` method on `mir::Field`" rather than a more localized error like "hey, there's no `last` on `IndexVec`".

So I propose renaming `last` to `last_index` to help distinguish `Vec::last`, which returns an element, and `IndexVec::last_index`, which returns an index.

(Similarly, `Iterator::last` also returns an element, not an index.)
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend 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-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 Mar 29, 2023
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 29, 2023

📌 Commit 1415756 has been approved by Dylan-DPC

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 Mar 29, 2023
@bors
Copy link
Contributor

bors commented Mar 29, 2023

⌛ Testing commit 1415756 with merge cf32b9d...

@bors
Copy link
Contributor

bors commented Mar 29, 2023

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing cf32b9d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 29, 2023
@bors bors merged commit cf32b9d into rust-lang:master Mar 29, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 29, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#109718 42866e2a5c9e4397fb85ac4da704ed4409cc567f
#109713 f9321c48b1e437c373196ccb0939ed64bd5aff63
#109683 92c44f2601da50556bef32f11993ac3bff484d80
#109664 1500729ac8a1b9fa7220b2a831b718990af8d460
#109659 1f28713a828869ff3aa13aeec03de68d54649c66
#109534 604f03570eceb24d9a0db0434fda04006e109306
#108335 2224bb97a1ffac7f5ec9c3ed5c3782681733a69a

previous master: f346fb0bc6

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 (cf32b9d): 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

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)
-3.7% [-3.7%, -3.7%] 1
Improvements ✅
(secondary)
-2.8% [-5.9%, -1.0%] 4
All ❌✅ (primary) -3.7% [-3.7%, -3.7%] 1

Cycles

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend 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-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.

10 participants