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 6 pull requests #100626

Merged
merged 78 commits into from
Aug 16, 2022
Merged

Rollup of 6 pull requests #100626

merged 78 commits into from
Aug 16, 2022

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

HKalbasi and others added 30 commits July 28, 2022 22:38
Previously added a blank _ => {} for match statements
fix: make `concat!` work with char

Fixes rust-lang#12921

- I avoided making `unquote_str()` take char literals as well because it's depended on by another function `parse_string()` that's only supposed to take strings.
- Even with this patch, we don't output `\0` as `\u{0}` which rust-lang#12921 pointed out ~~, but we're not actually responsible for serializing it but rowan is~~. They are functionally equivalent and I don't think it'd cause any confusion, but we *could* try escaping them before serialization (for reference, `rustc -Zunpretty=expanded`, which `cargo expand` uses under the hood, [makes use of `str::escape_default()`](https://github.com/rust-lang/rust/blob/3830ecaa8db798d2727cbdfa4ddf314ff938f268/compiler/rustc_ast/src/util/literal.rs#L161).
Add fixups for incomplete in proc-macros

Partially implements rust-lang/rust-analyzer#12777.

Added support for for loops and match statements.

I couldn't do paths like `crate::foo::` as I wasn't able to add `SyntheticTokens` to the end of `foo::`, they always ended up after `crate::`

This is my first contribution so please don't be shy about letting me know if I've done anything wrong!
Generate rust type from json

fix rust-lang#10118

Should this be a diagnostic? I made it a diagnostic because of issue label.
…Veykril

internal: Document CLI flag stability
[code] make toggleInlayHints understand {off,on}UntilPressed

fixes rust-lang#12964
…r=Veykril

Parse range patterns in struct and slice without trailing comma

Resolves rust-lang#12935

This patch includes the support for range patterns in slices, which is unstable (tracked in rust-lang#67264). If it's not desired I can remove it.
Corrected order of printing op and `=`

Fixes rust-lang/rust-analyzer#12971 where `Display` impl for assignment operators does `=+` instead of `+=`
Remove imports that are also in edition 2021's prelude

small cleanup
Fix pattern field completions not working for unions
Recover from missing ellipsis in record literals for path expressions
taiki-e and others added 8 commits August 16, 2022 19:52
…fn-trait-error, r=cjgillot

Fix nonsense non-tupled `Fn` trait error

Given this code:

```rust
#![feature(unboxed_closures)]

fn a<F: Fn<usize>>(f: F) {}

fn main() {
    a(|_: usize| {});
}
```

We currently emit this error:
```
error[E0631]: type mismatch in closure arguments
 --> src/main.rs:6:5
  |
6 |     a(|_: usize| {});
  |     ^ ---------- found signature of `fn(usize) -> _`
  |     |
  |     expected signature of `fn(usize) -> _`
  |
note: required by a bound in `a`
 --> src/main.rs:3:9
  |
3 | fn a<F: Fn<usize>>(f: F) {}
  |         ^^^^^^^^^ required by this bound in `a`

For more information about this error, try `rustc --explain E0631`.
error: could not compile `playground` due to previous error
```
Notably, it says the same thing for "expected" and "found"!

Fix the output so that we instead emit:
```
error[E0308]: mismatched types
 --> /home/gh-compiler-errors/test.rs:6:5
  |
6 |     a(|_: usize| {});
  |     ^ types differ
  |
  = note: expected trait `Fn<usize>`
             found trait `Fn<(usize,)>`
note: required by a bound in `a`
 --> /home/gh-compiler-errors/test.rs:3:9
  |
3 | fn a<F: Fn<usize>>(f: F) {}
  |         ^^^^^^^^^ required by this bound in `a`

error: aborting due to previous error
```

The error could still use some work, namely the "mismatched types" part, but I'm leaving it a bit rough since the only way you'd ever get this error is when you're messing with `#![feature(unboxed_closures)]`.

Simply making sure we actually print out the difference in trait-refs is good enough for me. I could probably factor in some additional improvements if those are desired.
Extend invalid floating point literal suffix suggestion

Fixes rust-lang#100527
… r=spastorino

Ast and parser tweaks

r? `@spastorino`
compiletest: fix typo in runtest.rs

nonexistant -> nonexistent
…r=lnicola

⬆️ rust-analyzer

r? `@ghost`
Support 128-bit atomics on all aarch64 targets

Some aarch64 targets currently set `max_atomic_width` to 64, but aarch64 always supports 128-bit atomics.

r? `@Amanieu`
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 16, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Aug 16, 2022

📌 Commit 35bd1d6 has been approved by Dylan-DPC

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 16, 2022
@bors
Copy link
Contributor

bors commented Aug 16, 2022

⌛ Testing commit 35bd1d6 with merge 4cbfe643c7010b0ac445023f1997882a01c7cd9f...

@bors
Copy link
Contributor

bors commented Aug 16, 2022

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 16, 2022
@Dylan-DPC
Copy link
Member Author

@bors retry

@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 16, 2022
@bors
Copy link
Contributor

bors commented Aug 16, 2022

⌛ Testing commit 35bd1d6 with merge 5746c75...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Aug 16, 2022

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 5746c75 to master...

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

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#100622 b947f86f81199021647431ecc85b7f5b24d5e113
#100616 94b80a99fd0a198fb50fde01056e3ac09244d4ba
#100613 9cbdbe2b2bf4516f88e58b08568faf44ba8414b0
#100610 62206322e10a7be799280015ceb3e1fc17c160f2
#100609 28d3a7ea8a4067c3237b4964c259453a58488601
#99942 18aed65a443979dbd7c1e635fce460ce49805418

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 (5746c75): comparison url.

Instruction count

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

Max RSS (memory usage)

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

Cycles

Results
  • Primary benchmarks: ❌ relevant regressions found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions ❌
(primary)
2.8% 3.3% 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.8% 3.3% 2

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

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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.