Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- println!("{:?}", {
- fn foo() -> impl Copy { 1 }; let n = foo(); let y = n; let z = n; (n, y, z)
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error[E0277]: `impl std::marker::Copy` doesn't implement `std::fmt::Debug`
- --> src/main.rs:4:22
- |
- 4 | println!("{:?}", {
- | ______________________^
- 5 | | fn foo() -> impl Copy { 1 }; let n = foo(); let y = n; let z = n; (n, y, z)
- 6 | | });
- | |_____^ `impl std::marker::Copy` cannot be formatted using `:?` because it doesn't implement `std::fmt::Debug`
- |
- = help: the trait `std::fmt::Debug` is not implemented for `impl std::marker::Copy`
- = note: required because of the requirements on the impl of `std::fmt::Debug` for `(impl std::marker::Copy, impl std::marker::Copy, impl std::marker::Copy)`
- = note: required by `std::fmt::Debug::fmt`
- 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 ===~~~~
- */
Add Comment
Please, Sign In to add comment