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 #96476

Closed
wants to merge 26 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

AronParker and others added 26 commits April 25, 2022 18:38
The code currently ignores the actual delimiter on the RHS and fakes up
a `NoDelim`/`DelimSpan::dummy()` one. This commit changes it to use the
actual delimiter.

The commit also reorders the fields for the `Delimited` variant to match
the `Sequence` variant.
…trochenkov

make `fn() -> _ { .. }` suggestion MachineApplicable

This might not be valid, but it would be nice to promote this to `MachineApplicable` so people can use rustfix here.

Also de65fcf009d07019689cfad7f327667e390a325d is to [restore the suggestion for `issue-77179.rs`](rust-lang@de65fcf#diff-12e43fb5d6d12ec7cb5c6b48204a18d113cf5de0e12eb71a358b639bd9aadaf0R8). (though in this case, the code in that issue still doesn't compile, so it's not marked with rustfix).
Make EncodeWide implement FusedIterator

[`EncodeUtf16`](https://doc.rust-lang.org/std/str/struct.EncodeUtf16.html) and [`EncodeWide`](https://doc.rust-lang.org/std/os/windows/ffi/struct.EncodeWide.html) currently serve similar purposes: They convert from UTF-8 to UTF-16 and WTF-8 to WTF-16, respectively. `EncodeUtf16` wraps a &str, whereas `EncodeWide` wraps an &OsStr.

When Iteration has concluded, these iterators wrap an empty slice, which will forever yield `None` values. Hence, `EncodeUtf16` rightfully implements `FusedIterator`. However, `EncodeWide` in contrast does not, even though it serves an almost identical purpose.

This PR attempts to fix that issue. I consider this change minor and non-controversial, hence why I have not added a RFC/FCP. Please let me know if the stability attribute is wrong or contains a wrong version number. Thanks in advance.

Fixes rust-lang#96368
…davidtwco

Migrate ambiguous plus diagnostic to the new derive macro

r? `@davidtwco` `@jyn514`
…=lnicola

⬆️ rust-analyzer

r? `@ghost`
…enkov

Less `NoDelim`

Currently there are several places where `NoDelim` (which really means "implicit delimiter" or "invisible delimiter") is used to mean "no delimiter". The name `NoDelim` is a bit misleading, and may be a cause.

This PR changes these places, e.g. by changing a `DelimToken` to `Option<DelimToken>` and then using `None` to mean "no delimiter". As a result, the *only* place where `NoDelim` values are now produced is within:
- `Delimiter::to_internal()`, when converting from `Delimiter::None`.
- `FlattenNonterminals::process_token()`, when converting `TokenKind::Interpolated`.

r? `@petrochenkov`
not need `Option` for `dbg_scope`

This PR fixes a few FIXME about not using `Option` in `dbg_scope` field of `DebugScope`, during `create_function_debug_context` func in codegen parts.
Added a `BitSet<SourceScope>` parameter to `make_mir_scope` to indicate whether the `DebugScope` has been instantiated.
cc `@eddyb`
@rustbot rustbot 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 Apr 27, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 27, 2022

📌 Commit 86c98d2 has been approved by Dylan-DPC

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

bors commented Apr 27, 2022

⌛ Testing commit 86c98d2 with merge 30bf07bc102cd9b36adffcefec4d301c782443bd...

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-netbsd failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] kqueue test:false 1.018
   Compiling notify v5.0.0-pre.14
[RUSTC-TIMING] unicode_normalization test:false 1.749
   Compiling dashmap v5.2.0
error[E0004]: non-exhaustive patterns: `Open`, `CloseWrite` and `Close` not covered
   --> /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/notify-5.0.0-pre.14/src/kqueue.rs:152:39
152 |                     let event = match data {
152 |                     let event = match data {
    |                                       ^^^^ patterns `Open`, `CloseWrite` and `Close` not covered
    |
note: `kqueue::Vnode` defined here
    |
    |
60  | / pub enum Vnode {
61  | |     /// The file was deleted
62  | |     Delete,
...   |
86  | |     Open,
    | |     ^^^^ not covered
...   |
...   |
89  | |     CloseWrite,
    | |     ^^^^^^^^^^ not covered
...   |
92  | |     Close,
    | |     ^^^^^ not covered
93  | | }
    | |_-
    = note: the matched value is of type `kqueue::Vnode`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
265 ~                         }
266 + 
266 + 
267 +                         // Access to the file was revoked via revoke(2) or the underlying file system was unmounted.
268 +                         Open | CloseWrite | Close => todo!()

[RUSTC-TIMING] text_edit test:false 1.359
   Compiling idna v0.2.3
For more information about this error, try `rustc --explain E0004`.
---
[RUSTC-TIMING] object test:false 5.077
[RUSTC-TIMING] pulldown_cmark test:false 3.483
[RUSTC-TIMING] syn test:false 6.342
[RUSTC-TIMING] syn test:false 6.204
thread 'main' panicked at 'rust-analyzer always builds', src/bootstrap/dist.rs:1080:14
[TIMING] tool::RustAnalyzer { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu }, target: x86_64-unknown-netbsd, extra_features: [] } -- 0.000
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:19:34

@bors
Copy link
Contributor

bors commented Apr 27, 2022

💔 Test failed - checks-actions

@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 Apr 27, 2022
@klensy
Copy link
Contributor

klensy commented Apr 27, 2022

#96419 fail?

@Dylan-DPC
Copy link
Member Author

#96419 fail?

tried a new rollup without the RA bump

@bors
Copy link
Contributor

bors commented Apr 28, 2022

☔ The latest upstream changes (presumably #96528) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC Dylan-DPC closed this Apr 29, 2022
@Dylan-DPC Dylan-DPC deleted the rollup-16ximtz branch April 29, 2022 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.