Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- (.. 26u32).map(|n| std::char::from_u32('a' as u32 + n).unwrap()).collect::<Vec<_>>()
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0599]: no method named `map` found for type `std::ops::RangeTo<u32>` in the current scope
- --> src/main.rs:6:20
- |
- 6 | (.. 26u32).map(|n| std::char::from_u32('a' as u32 + n).unwrap()).collect::<Vec<_>>()
- | ^^^
- |
- = note: the method `map` exists but the following trait bounds were not satisfied:
- `&mut std::ops::RangeTo<u32> : std::iter::Iterator`
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0599`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement