Closed
Description
Blocked on #49162
Example:
Lines 40 to 49 in c19264f
Instead of:
use std::fs::File;
use std::io::prelude::*;
# fn foo() -> std::io::Result<()> {
let mut file = File::create("foo.txt")?;
file.write_all(b"Hello, world!")?;
# Ok(())
# }
We can now do:
use std::fs::File;
use std::io::Error;
use std::io::prelude::*;
fn main() -> Result<(), Error> {
let mut file = File::create("foo.txt")?;
file.write_all(b"Hello, world!")?;
Ok(())
}
Which can be copied/pasted straight from the docs such that it will compile, unlike the old example