The Error Handling Documentation on the page http://static.rust-lang.org/doc/master/std/io/index.html has a code example that is incorect it is missing a .trap method.