-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 5 pull requests #90659
Closed
Closed
Rollup of 5 pull requests #90659
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The adjustments are used later by ExprUseVisitor to build Place projections and without adjustments it can produce invalid result.
Includes documentation for: - general page structure - navigation - searching - themes - deep-linking Doesn't include docs on the settings page.
For example: enum Ty { Unit, List(Box<Ty>), } fn foo(x: Ty) -> Ty { match x { Ty::Unit => Ty::Unit, Ty::List(elem) => foo(elem), } } Before, the only suggestion was to rewrap `elem` with `Ty::List`, which is unhelpful and confusing: error[E0308]: mismatched types --> src/test/ui/suggestions/boxed-variant-field.rs:9:31 | 9 | Ty::List(elem) => foo(elem), | ^^^^ | | | expected enum `Ty`, found struct `Box` | help: try using a variant of the expected enum: `Ty::List(elem)` | = note: expected enum `Ty` found struct `Box<Ty>` Now, rustc will first suggest dereferencing the `Box`, which is most likely what the user intended: error[E0308]: mismatched types --> src/test/ui/suggestions/boxed-variant-field.rs:9:31 | 9 | Ty::List(elem) => foo(elem), | ^^^^ expected enum `Ty`, found struct `Box` | = note: expected enum `Ty` found struct `Box<Ty>` help: try dereferencing the `Box` | 9 | Ty::List(elem) => foo(*elem), | + help: try using a variant of the expected enum | 9 | Ty::List(elem) => foo(Ty::List(elem)), | ~~~~~~~~~~~~~~
… r=jyn514 Add a chapter on reading Rustdoc output Includes documentation for: - general page structure - navigation - searching - themes - deep-linking Doesn't include docs on the settings page. Per rust-lang#90309
Apply adjustments for field expression even if inaccessible The adjustments are used later by ExprUseVisitor to build Place projections and without adjustments it can produce invalid result. Fix rust-lang#90483 `@rustbot` label: T-compiler
Suggest dereference of `Box` when inner type is expected For example: enum Ty { Unit, List(Box<Ty>), } fn foo(x: Ty) -> Ty { match x { Ty::Unit => Ty::Unit, Ty::List(elem) => foo(elem), } } Before, the only suggestion was to rewrap `inner` with `Ty::Wrapper`, which is unhelpful and confusing: error[E0308]: mismatched types --> src/test/ui/suggestions/boxed-variant-field.rs:9:31 | 9 | Ty::List(elem) => foo(elem), | ^^^^ | | | expected enum `Ty`, found struct `Box` | help: try using a variant of the expected enum: `Ty::List(elem)` | = note: expected enum `Ty` found struct `Box<Ty>` Now, rustc will first suggest dereferencing the `Box`, which is most likely what the user intended: error[E0308]: mismatched types --> src/test/ui/suggestions/boxed-variant-field.rs:9:31 | 9 | Ty::List(elem) => foo(elem), | ^^^^ expected enum `Ty`, found struct `Box` | = note: expected enum `Ty` found struct `Box<Ty>` help: try dereferencing the `Box` | 9 | Ty::List(elem) => foo(*elem), | + help: try using a variant of the expected enum | 9 | Ty::List(elem) => foo(Ty::List(elem)), | ~~~~~~~~~~~~~~ r? `@davidtwco`
…llot use matches!() macro in more places
Run reveal_all on MIR when inlining is activated. Fix logic error in rust-lang#85254 which prevented the pass from running when needed. Fixes rust-lang#78442 r? `@lcnr`
@bors r+ rollup=never p=5 |
📌 Commit f50080f has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Nov 6, 2021
@bors r- |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Nov 6, 2021
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-author
Status: This is awaiting some action (such as code changes or more information) from the author.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
Box
when inner type is expected #90627 (Suggest dereference ofBox
when inner type is expected)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup