Uh oh!
There was an error while loading. Please reload this page.
When needing type annotations in local bindings, account for impl Trait and closures - #63507
Conversation
…it and closures Do not suggest nonsensical types when the type inference is failing on `impl Trait` or anonymous closures.
rust-highfive
commented
Aug 13, 2019
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
estebank
commented
Aug 13, 2019
r? @Centril |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
When encountering a boxed value as expected and a stack allocated value that could be boxed to fulfill the expectation, like in the following snippet, suggest `Box::new` wrapping.
c96135e to
fb2511cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Centril
commented
Aug 13, 2019
Thanks! r=me with ^--- addressed :) |
estebank
commented
Aug 13, 2019
@bors r=Centril |
bors
commented
Aug 13, 2019
📌 Commit 939c1cb has been approved by |
Centril
commented
Aug 13, 2019
@estebank I'm fine with either... ;) |
estebank
commented
Aug 13, 2019
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Centril
commented
Aug 14, 2019
The code makes sense but could use a bit of refactoring so the method isn't too overwhelming to read. I've suggested some ways to fix that ^--- r=me with those addressed. |
estebank
commented
Aug 14, 2019
@bors r=Centril |
bors
commented
Aug 14, 2019
📌 Commit 6c3a98e has been approved by |
…ntril When needing type annotations in local bindings, account for impl Trait and closures Fixrust-lang#46680, fixrust-lang#63504, fixrust-lang#63506, fixrust-lang#40014, cc rust-lang#63502.
Rollup of 11 pull requests Successful merges: - #62984 (Add lint for excess trailing semicolons) - #63075 (Miri: Check that a ptr is aligned and inbounds already when evaluating `*`) - #63490 (libsyntax: cleanup and refactor `pat.rs`) - #63507 (When needing type annotations in local bindings, account for impl Trait and closures) - #63509 (Point at the right enclosing scope when using `await` in non-async fn) - #63528 (syntax: Remove `DummyResult::expr_only`) - #63537 (expand: Unimplement `MutVisitor` on `MacroExpander`) - #63542 (Add NodeId for Arm, Field and FieldPat) - #63543 (Merge Variant and Variant_) - #63560 (move test that shouldn't be in test/run-pass/) - #63570 (Adjust tracking issues for `MaybeUninit<T>` gates) Failed merges: r? @ghost
Fix#46680, fix#63504, fix#63506, fix#40014, cc #63502.