Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
58e901b6fd1163172149fd422565523b17eed5f0
rust/tests/ui/inference/cannot-infer-closure.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
124 B
Rust
Raw Normal View History

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
};
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1409ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API