Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- let mut iter = (0..10); iter.next().filter(|item| iter.all(|x| *x == item))
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- warning: unnecessary parentheses around assigned value
- --> src/main.rs:6:24
- |
- 6 | let mut iter = (0..10); iter.next().filter(|item| iter.all(|x| *x == item))
- | ^^^^^^^ help: remove these parentheses
- |
- = note: #[warn(unused_parens)] on by default
- error[E0614]: type `{integer}` cannot be dereferenced
- --> src/main.rs:6:72
- |
- 6 | let mut iter = (0..10); iter.next().filter(|item| iter.all(|x| *x == item))
- | ^^
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0614`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Add Comment
Please, Sign In to add comment