Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- println!("{:?}", {
- (&[1usize, 2, 3]).iter().map(|&x| x*2).sum()
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error[E0283]: type annotations required: cannot resolve `_: std::iter::Sum<usize>`
- --> src/main.rs:5:48
- |
- 5 | (&[1usize, 2, 3]).iter().map(|&x| x*2).sum()
- | ^^^
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0283`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Add Comment
Please, Sign In to add comment