This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Activity
42ee400b0f
rust
/
tests
/
ui
/
inference
/
cannot-infer-closure.rs
8 lines
124 B
Rust
Raw
Normal View
History
Unescape
Escape
When needing type annotations in local bindings, account for impl Trait and closures Do not suggest nonsensical types when the type inference is failing on `impl Trait` or anonymous closures.
2019-08-12 16:50:46 -07:00
fn
main
(
)
{
Resolve types when suggesting boxed closure
2019-08-12 18:12:19 -07:00
let
x
=
|
a
:
(
)
,
b
:
(
)
|
{
Better rustc_on_unimplemented, and UI test fixes
2021-04-17 11:56:07 -07:00
Err
(
a
)
?
;
selection failure: recompute applicable impls
2022-10-19 17:17:19 +02:00
Ok
(
b
)
//~^ ERROR type annotations needed
When needing type annotations in local bindings, account for impl Trait and closures Do not suggest nonsensical types when the type inference is failing on `impl Trait` or anonymous closures.
2019-08-12 16:50:46 -07:00
}
;
}
Copy permalink