This commit is contained in:
Esteban Küber 2019-08-12 18:42:19 -07:00
parent 3b6d46c640
commit 1e6f753762
3 changed files with 5 additions and 5 deletions

View File

@ -175,7 +175,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
name,
))
}
Some(ty::TyS { sty: ty::TyKind::Closure(def_id, substs), .. }) => {
Some(ty::TyS { sty: ty::Closure(def_id, substs), .. }) => {
let msg = " for the closure".to_string();
let fn_sig = substs.closure_sig(*def_id, self.tcx);
let args = fn_sig.inputs()

View File

@ -5,14 +5,14 @@
use std::io::Error;
fn make_unit() -> Result<(), Error> {
fn make_unit() -> Result<(), Error> {
Ok(())
}
fn main() {
let fut = async {
make_unit()?; //~ ERROR type annotations needed
Ok(())
};
}

View File

@ -3,14 +3,14 @@
use std::io::Error;
fn make_unit() -> Result<(), Error> {
fn make_unit() -> Result<(), Error> {
Ok(())
}
fn main() {
let fut = async {
make_unit()?; //~ ERROR type annotations needed
Ok(())
};
}