Skip to content

Rollup of 8 pull requests - #100516

Merged
bors merged 22 commits into
rust-lang:masterfrom
compiler-errors:rollup-fgrfeb3
Aug 14, 2022
Merged

Rollup of 8 pull requests#100516
bors merged 22 commits into
rust-lang:masterfrom
compiler-errors:rollup-fgrfeb3

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

aDotInTheVoidand 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
Fixesrust-lang#99635
…triddle
make `clean::Item::span` return `Option` instead of dummy span
Fixesrust-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
Closesrust-lang#100106
Suggest the path separator when a dot is used on a trait
Fixesrust-lang#100365.
`@rustbot` label A-diagnostics
r? diagnostics
…stab, r=estebank
Enum variant ctor inherits the stability of the enum variant
Fixesrust-lang#100399Fixesrust-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
fixesrust-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.
@rustbotrustbot 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
Copy Markdown
ContributorAuthor

@bors r+ rollup=never p=8

@bors

bors commented Aug 14, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit b3e76aa has been approved by compiler-errors

It is now in the queue for this repository.

@borsbors 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

bors commented Aug 14, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit b3e76aa with merge 2fbc08e...

@bors

bors commented Aug 14, 2022

Copy link
Copy Markdown
Collaborator

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

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Aug 14, 2022
@bors
bors merged commit 2fbc08e into rust-lang:masterAug 14, 2022
@rustbotrustbot added this to the 1.65.0 milestone Aug 14, 2022
@rust-timer

Copy link
Copy Markdown
Collaborator

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (2fbc08e): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: ❌ relevant regression found
mean1maxcount2
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
mean1maxcount2
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
mean1maxcount2
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 change23

  2. number of relevant changes23

@compiler-errors
compiler-errors deleted the rollup-fgrfeb3 branch August 11, 2023 20:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.T-rustdocRelevant 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

@compiler-errors@bors@rust-timer@rustbot@aDotInTheVoid@fmease@TaKO8Ki@cuviper