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

Merged
merged 16 commits into from
Aug 7, 2024
Merged

Rollup of 7 pull requests #128748

merged 16 commits into from
Aug 7, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GrigorenkoPV and others added 16 commits July 30, 2024 00:34
The Cargo.lock in library/ should be used instead. Including the
Cargo.lock for the root workspace is both unnecessary and confusing.
…atable, r=davidtwco

rustc_lint: make `let-underscore-lock` translatable
…dtwco

Fix ICE Caused by Incorrectly Delaying E0107

Fixes  rust-lang#128249

For the following code:
```rust
trait Foo<T> {}
impl Foo<T: Default> for u8 {}
```
rust-lang#126054 added some logic to delay emitting E0107 as the names of associated type `T` in the impl header and generic parameter `T` in `trait Foo` match.

But it failed to ensure whether such unexpected associated type bounds are coming from a impl block header. This caused an ICE as the compiler was delaying E0107 for code like:
```rust
trait Trait<Type> {
    type Type;

    fn method(&self) -> impl Trait<Type: '_>;
}
```
because it assumed the associated type bound `Type: '_` is for the generic parameter `Type` in `trait Trait` since the names are same.

This PR adds a check to ensure that E0107 is delayed only in the context of impl block header.
…petrochenkov

Fallback to string formatting if source is not available for lint

Fixes rust-lang#128445
…=onur-ozkan

Remove the root Cargo.lock from the rust-src component

The Cargo.lock in library/ should be used instead. Including the Cargo.lock for the root workspace is both unnecessary and confusing.

Missed in rust-lang#128534
…ator-2024, r=GuillaumeGomez

rustdoc-search: account for numeric disambiguators on impls

Fixes rust-lang#128676
Pass the right `ParamEnv` to `might_permit_raw_init_strict`

Fixes rust-lang#119620

`might_permit_raw_init_strict` currently passes an empty `ParamEnv` to the `InterpCx`, instead of the actual `ParamEnv` that was passed in to `check_validity_requirement` at callsite.

This leads to ICEs such as the linked issue where for `UnsafeCell<*mut T>` we initially get the layout with the right `ParamEnv` (which suceeds because it can prove that `T: Sized` and therefore `UnsafeCell<*mut T>` has a known layout) but then do the rest with an empty `ParamEnv` where `T: Sized` is not known to hold so getting the layout for `*mut T` later fails.

This runs into an assertion in other layout code where it's making the (valid) assumption that, when we already have a layout for a struct (`UnsafeCell<*mut T>`), getting the layout of one of its fields (`*mut T`) should also succeed, which wasn't the case here due to using the wrong `ParamEnv`.

So, this PR changes it to just use the same `ParamEnv` all the way throughout.
…ix, r=notriddle

Fix rustdoc missing handling of remap-path-prefix option

Fixes rust-lang#69264.

cc `@weihanglo`
r? `@notriddle`
@rustbot rustbot added 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 6, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Aug 6, 2024

📌 Commit 47a2f14 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 Aug 6, 2024
@bors
Copy link
Contributor

bors commented Aug 6, 2024

⌛ Testing commit 47a2f14 with merge 0ddead3...

@bors
Copy link
Contributor

bors commented Aug 7, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 0ddead3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 7, 2024
@bors bors merged commit 0ddead3 into rust-lang:master Aug 7, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 7, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#128369 rustc_lint: make let-underscore-lock translatable bc105d31ffbd543f4c52e5d66674ec400cf50250 (link)
#128377 Fix ICE Caused by Incorrectly Delaying E0107 9a807ca46eeef94f1f6f6741dacd949ab09d3044 (link)
#128517 Fallback to string formatting if source is not available fo… 4ff81478925bcc286c2b7be84822bf9fa42ee520 (link)
#128685 Remove the root Cargo.lock from the rust-src component 125e478d01b49571cad048df6e973a919f1b697e (link)
#128693 rustdoc-search: account for numeric disambiguators on impls fd9c7647911d461c5aa427aee70723ffea3bc6a2 (link)
#128720 Pass the right ParamEnv to might_permit_raw_init_strict dd22816e7d7fb38797fb2f6486dd17e92583b251 (link)
#128736 Fix rustdoc missing handling of remap-path-prefix option 3b3b97127d6e834a6ba74cad27104e2b6d57318d (link)

previous master: 60d146580c

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 (0ddead3): 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)

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

Cycles

Results (primary -1.6%, secondary -2.5%)

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)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.4% [-4.3%, -2.5%] 2
Improvements ✅
(secondary)
-2.5% [-3.1%, -2.1%] 3
All ❌✅ (primary) -1.6% [-4.3%, 2.1%] 3

Binary size

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

Bootstrap: 760.99s -> 761.535s (0.07%)
Artifact size: 336.87 MiB -> 336.91 MiB (0.01%)

@matthiaskrgr matthiaskrgr deleted the rollup-dzvi5f7 branch September 1, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-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.