You can annotate the return type inside the closure in those cases, for example:
let x = || async {
let file = std::fs::read_to_string("foo.txt")?;
Ok::<_, Box<dyn std::error::Error>>(file)
};