Skip to content

Suggest calling closure with resolved return type when appropriate#63833

Merged
bors merged 2 commits intorust-lang:masterfrom
estebank:suggest-closure-call
Aug 25, 2019
Merged

Suggest calling closure with resolved return type when appropriate#63833
bors merged 2 commits intorust-lang:masterfrom
estebank:suggest-closure-call

Conversation

@estebank
Copy link
Copy Markdown
Contributor

@estebank estebank commented Aug 23, 2019

Follow up to #63337. CC #63100.

error[E0308]: mismatched types
  --> $DIR/fn-or-tuple-struct-without-args.rs:46:20
   |
LL |     let closure = || 42;
   |                   -- closure defined here
LL |     let _: usize = closure;
   |                    ^^^^^^^
   |                    |
   |                    expected usize, found closure
   |                    help: use parentheses to call this closure: `closure()`
   |
   = note: expected type `usize`
              found type `[closure@$DIR/fn-or-tuple-struct-without-args.rs:45:19: 45:24]`

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants