Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- String::from(123).chars().rev().collect::<String>()
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0277]: the trait bound `std::string::String: std::convert::From<{integer}>` is not satisfied
- --> src/main.rs:6:9
- |
- 6 | String::from(123).chars().rev().collect::<String>()
- | ^^^^^^^^^^^^ the trait `std::convert::From<{integer}>` is not implemented for `std::string::String`
- |
- = help: the following implementations were found:
- <std::string::String as std::convert::From<&'a str>>
- <std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
- <std::string::String as std::convert::From<std::boxed::Box<str>>>
- = note: required by `std::convert::From::from`
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0277`.
- 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