Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- println!("{:?}", {
- std::fs::File::open("foo").map_err(<_>::to_string)
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error[E0631]: type mismatch in function arguments
- --> src/main.rs:5:36
- |
- 5 | std::fs::File::open("foo").map_err(<_>::to_string)
- | ^^^^^^^
- | |
- | expected signature of `fn(std::io::Error) -> _`
- | found signature of `for<'r> fn(&'r _) -> _`
- error: aborting due to previous error
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Add Comment
Please, Sign In to add comment