-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #90661
Rollup of 6 pull requests #90661
Conversation
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
type error go brrrrrrrr Fixes rust-lang#90444 when we relate something like: `fn(fn((), (), u32))` with `fn(fn((), (), ()))` we relate the inner fn ptrs: `fn((), (), u32)` with `fn((), (), ())` yielding a `TypeError::ArgumentSorts(_, 2)` which we then use as the `TypeError` for the `fn(fn(..))` which later causes the ICE as the `2` does not correspond to any input or output types in `fn(_)` r? `@estebank`
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=6 |
📌 Commit ec471de has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (089a016): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
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