Skip to content

Rollup of 5 pull requests - #98284

Merged
bors merged 12 commits into
rust-lang:masterfrom
JohnTitor:rollup-7lbs143
Jun 20, 2022
Merged

Rollup of 5 pull requests#98284
bors merged 12 commits into
rust-lang:masterfrom
JohnTitor:rollup-7lbs143

Conversation

@JohnTitor

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dtolnayand others added 12 commits June 16, 2022 17:03
Currently fails.
---- [pretty] src/test/pretty/where-clauses.rs stdout ----
error: pretty-printed source does not match expected source
expected:
------------------------------------------
// pp-exact
fn f<'a, 'b, T>(t: T) -> isize where T: 'a, 'a: 'b, T: Eq { 0 }
// This is legal syntax, sometimes generated by macros. `where T: $($bound+)*`
fn zero_bounds<'a, T>() where 'a:, T: {}
fn main() {}
------------------------------------------
actual:
------------------------------------------
// pp-exact
fn f<'a, 'b, T>(t: T) -> isize where T: 'a, 'a: 'b, T: Eq { 0 }
// This is legal syntax, sometimes generated by macros. `where T: $($bound+)*`
fn zero_bounds<'a, T>() where 'a, T {}
fn main() {}
------------------------------------------
diff:
------------------------------------------
3	fn f<'a, 'b, T>(t: T) -> isize where T: 'a, 'a: 'b, T: Eq { 0 }
4
5	// This is legal syntax, sometimes generated by macros. `where T: $($bound+)*`
-	fn zero_bounds<'a, T>() where 'a:, T: {}
+	fn zero_bounds<'a, T>() where 'a, T {}
7
8	fn main() {}
9
Incorrect pluralisation of `crate`
It's a map, not a vector.
Fix pretty printing of empty bound lists in where-clause
Repro:
```rust
macro_rules! assert_item_stringify {
($item:item $expected:literal) => {
assert_eq!(stringify!($item), $expected);
};
}
fn main() {
assert_item_stringify! {
fn f<'a, T>() where 'a:, T: {}
"fn f<'a, T>() where 'a:, T: {}"
}
}
```
Previously this assertion would fail because rustc renders the where-clause as `where 'a, T` which is invalid syntax.
This PR makes the above assertion pass.
This bug also affects `-Zunpretty=expanded`. The intention is for that to emit syntactically valid code, but the buggy output is not valid Rust syntax.
```console
$ rustc <(echo "fn f<'a, T>() where 'a:, T: {}") -Zunpretty=expanded
#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
fn f<'a, T>() where 'a, T {}
```
```console
$ rustc <(echo "fn f<'a, T>() where 'a:, T: {}") -Zunpretty=expanded | rustc -
error: expected `:`, found `,`
--> <anon>:7:23
|
7 | fn f<'a, T>() where 'a, T {}
| ^ expected `:`
```
…-better, r=lcnr
Improve `lifetime arguments are not allowed on` error message
Actually mention what thing we're improperly trying to add lifetime generics to.
Fix minor documentation typo
Fixes incorrect pluralisation of `crate` in documentation for rustc_trait_selection
…cjgillot
Minor improvements on error for `Self` type in items that don't allow it
Fixesrust-lang#93796
Fix typo in `HashMap::drain` docs
It's a map, not a vector.
Fixesrust-lang#98275.
@rustbotrustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 20, 2022
@JohnTitor

Copy link
Copy Markdown
MemberAuthor

@bors r+ p=5 rollup=never

@bors

bors commented Jun 20, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 66dbc3f has been approved by JohnTitor

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 20, 2022
@bors

bors commented Jun 20, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 66dbc3f with merge 4104596...

@bors

bors commented Jun 20, 2022

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing 4104596 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jun 20, 2022
@bors
bors merged commit 4104596 into rust-lang:masterJun 20, 2022
@rustbotrustbot added this to the 1.63.0 milestone Jun 20, 2022
@JohnTitor
JohnTitor deleted the rollup-7lbs143 branch June 20, 2022 11:16
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (4104596): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1maxcount2
Regressions 😿
(primary)
N/AN/A0
Regressions 😿
(secondary)
0.2%0.2%1
Improvements 🎉
(primary)
N/AN/A0
Improvements 🎉
(secondary)
N/AN/A0
All 😿🎉 (primary)N/AN/A0

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvements found
mean1maxcount2
Regressions 😿
(primary)
N/AN/A0
Regressions 😿
(secondary)
N/AN/A0
Improvements 🎉
(primary)
N/AN/A0
Improvements 🎉
(secondary)
-3.0%-5.1%3
All 😿🎉 (primary)N/AN/A0

Cycles

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: 😿 relevant regression found
mean1maxcount2
Regressions 😿
(primary)
N/AN/A0
Regressions 😿
(secondary)
4.5%4.5%1
Improvements 🎉
(primary)
-2.2%-2.2%1
Improvements 🎉
(secondary)
N/AN/A0
All 😿🎉 (primary)-2.2%-2.2%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

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-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library 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

@JohnTitor@bors@rust-timer@rustbot@dtolnay@compiler-errors@Piturnah@Noratrieb