Merged
Conversation
Signed-off-by: Xuanwo <github@xuanwo.io>
Previously we were suggesting stuff like `fn f( &u32) {}`
To avoid circular link time dependency between core and compiler builtins when building with `-Zshare-generics`.
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
…ntation, r=dtolnay os str capacity documentation This is based on rust-lang#95394 , with expansion and consolidation to address comments from `@dtolnay` and other `@rust-lang/libs-api` team members.
…ions, r=compiler-errors
Fix suggestions for `&a: T` parameters
I've accidentally discovered that we have broken suggestions for `&a: T` parameters:
```rust
fn f(&mut bar: u32) {}
fn main() {
let _ = |&mut a| ();
}
```
```text
error[E0308]: mismatched types
--> ./t.rs:1:6
|
1 | fn f(&mut bar: u32) {}
| ^^^^^^^^-----
| | |
| | expected due to this
| expected `u32`, found `&mut _`
| help: did you mean `bar`: `&u32`
|
= note: expected type `u32`
found mutable reference `&mut _`
error[E0308]: mismatched types
--> ./t.rs:4:23
|
4 | let _: fn(u32) = |&mut a| ();
| ^^^^^--
| | |
| | expected due to this
| expected `u32`, found `&mut _`
| help: did you mean `a`: `&u32`
|
= note: expected type `u32`
found mutable reference `&mut _`
```
It's hard to see, but
1. The help span is overlapping with "expected" spans
2. It suggests `fn f( &u32) {}` (no `mut` and lost parameter name) and `|&u32 ()` (no closing `|` and lost parameter name)
I've tried to fix this.
r? ``@compiler-errors``
…n-ice, r=notriddle Fix generic impl rustdoc json output Fixes rust-lang#97986. The problem in case of generic trait impl is that the trait's items are the same for all the types afterward. But since they're the same, it's safe for rustdoc-json to just ignore them. A little representation of what's going on: ```rust trait T { fn f(); // <- defid 0 } impl<Y> T for Y { fn f() {} // <- defid 1 } struct S; // <- defid 1 (since it matches `impl<Y> T for Y` ``` cc ```@Urgau``` r? ```@CraftSpider```
…=Amanieu Inline `const_eval_select` To avoid circular link time dependency between core and compiler builtins when building with `-Zshare-generics`. r? ```@Amanieu```
…pand-collapse, r=notriddle Fix sidebar items expand collapse The collapse/expand event was not working for the items in the source code viewer sidebar (talking about these items:  ). This PR fixes it and adds a GUI test to prevent another regression. r? ```@notriddle```
…or, r=estebank Refactor path segment parameter error This PR attempts to rewrite the error handling for an unexpected parenthesised type parameters to: - Use provided data instead of re-parsing the whole span - Add a multipart suggestion to reflect on the changes with an underline - Remove the unnecessary "if" nesting
…iler-errors Add regression test for rust-lang#93775 Closes rust-lang#93775, also closes rust-lang#93022 as it should have the same root cause r? ```@compiler-errors``` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
Member
Author
|
@bors r+ p=7 rollup=never |
Collaborator
|
📌 Commit 4ab704e has been approved by |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
Collaborator
|
Finished benchmarking commit (5bc82c0): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
&a: Tparameters #97964 (Fix suggestions for&a: Tparameters)const_eval_select#98059 (Inlineconst_eval_select)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup