Skip to content

Conversation

compiler-errors
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

aDotInTheVoid and others added 22 commits August 10, 2022 10:21
…-arg-label, r=estebank

Only point out a single function parameter if we have a single arg incompatibility

Fixes rust-lang#99635
…triddle

make `clean::Item::span` return `Option` instead of dummy span

Fixes rust-lang#100283
…=GuillaumeGomez

Rustdoc-Json: Add `Path` type for traits.

Avoids using `Type` for trait fields, as a trait must always be a path, and not any other kind of type.

``@rustbot`` modify labels: +A-rustdoc-json +T-rustdoc

Closes rust-lang#100106
Suggest the path separator when a dot is used on a trait

Fixes rust-lang#100365.

`@rustbot` label A-diagnostics
r? diagnostics
…stab, r=estebank

Enum variant ctor inherits the stability of the enum variant

Fixes rust-lang#100399
Fixes rust-lang#100420

Context rust-lang#71481 for why enum variants don't need stability
…-after-impl-trait-items, r=compiler-errors

Suggest removing a semicolon after impl/trait items

fixes rust-lang#99822
Use an extensionless `x` script for non-Windows

rust-lang#99992 added `x.sh` and `x.ps1`, but this broke my lazy `./xTAB` habit that used to get me to `./x.py`. If we rename `x.sh` to `x`, then I can adjust to `./xSPACE` for the same number of characters typed.

r? `@jyn514`
…r-improvements, r=lcnr

Argument type error improvements

Motivated by this interesting code snippet:

```rust
#[derive(Copy, Clone)]
struct Wrapper<T>(T);

fn foo(_: fn(i32), _: Wrapper<i32>) {}

fn f(_: u32) {}

fn main() {
    let w = Wrapper::<isize>(1isize);
    foo(f, w);
}
```

Which currently errors like:
```
error[E0308]: arguments to this function are incorrect
  --> src/main.rs:10:5
   |
10 |     foo(f, w);
   |     ^^^ -  - expected `i32`, found `isize`
   |         |
   |         expected `i32`, found `u32`
   |
   = note: expected fn pointer `fn(i32)`
                 found fn item `fn(u32) {f}`
   = note: expected struct `Wrapper<i32>`
              found struct `Wrapper<isize>`
note: function defined here
  --> src/main.rs:4:4
   |
4  | fn foo(_: fn(i32), _: Wrapper<i32>) {}
   |    ^^^ ----------  ---------------
```

Specifically, that double `expected .. found ..` which is very difficult to correlate to the types in the arguments. Also, the fact that "expected `i32`, found `isize`" and the other argument mismatch label don't even really explain what's going on here.

After this PR:
```
error[E0308]: arguments to this function are incorrect
  --> $DIR/two-mismatch-notes.rs:10:5
   |
LL |     foo(f, w);
   |     ^^^
   |
note: expected fn pointer, found fn item
  --> $DIR/two-mismatch-notes.rs:10:9
   |
LL |     foo(f, w);
   |         ^
   = note: expected fn pointer `fn(i32)`
                 found fn item `fn(u32) {f}`
note: expected struct `Wrapper`, found a different struct `Wrapper`
  --> $DIR/two-mismatch-notes.rs:10:12
   |
LL |     foo(f, w);
   |            ^
   = note: expected struct `Wrapper<i32>`
              found struct `Wrapper<isize>`
note: function defined here
  --> $DIR/two-mismatch-notes.rs:4:4
   |
LL | fn foo(_: fn(i32), _: Wrapper<i32>) {}
   |    ^^^ ----------  ---------------

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
```

Yeah, it's a bit verbose, but much clearer IMO.

---

Open to discussions about how this could be further improved. Motivated by `@jyn514's` [tweet](https://mobile.twitter.com/joshuayn514/status/1558042020601634816) here.
@rustbot rustbot added 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-infra Relevant to the infrastructure 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 14, 2022
@compiler-errors
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Collaborator

bors commented Aug 14, 2022

📌 Commit b3e76aa has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 14, 2022
@bors
Copy link
Collaborator

bors commented Aug 14, 2022

⌛ Testing commit b3e76aa with merge 2fbc08e...

@bors
Copy link
Collaborator

bors commented Aug 14, 2022

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 2fbc08e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 14, 2022
@bors bors merged commit 2fbc08e into rust-lang:master Aug 14, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 14, 2022
@rust-timer
Copy link
Collaborator

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2fbc08e): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: ❌ relevant regression found
mean1 max count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% 2.0% 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results
  • Primary benchmarks: ✅ relevant improvements found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.1% 3.1% 2
Improvements ✅
(primary)
-1.5% -2.2% 2
Improvements ✅
(secondary)
-1.5% -1.5% 1
All ❌✅ (primary) -1.5% -2.2% 2

Cycles

Results
  • Primary benchmarks: ❌ relevant regression found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions ❌
(primary)
3.1% 3.1% 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.1% 3.1% 1

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@compiler-errors compiler-errors deleted the rollup-fgrfeb3 branch August 11, 2023 20:16
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-infra Relevant to the infrastructure 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.

8 participants