Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- println!("{:?}", {
- std::mem::size_of::<std::cell::RefCell<dyn std::fmt::Debug>>()
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error[E0277]: the trait bound `std::fmt::Debug: std::marker::Sized` is not satisfied in `std::cell::RefCell<std::fmt::Debug>`
- --> src/main.rs:5:9
- |
- 5 | std::mem::size_of::<std::cell::RefCell<dyn std::fmt::Debug>>()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::fmt::Debug` does not have a constant size known at compile-time
- |
- = help: within `std::cell::RefCell<std::fmt::Debug>`, the trait `std::marker::Sized` is not implemented for `std::fmt::Debug`
- = note: required because it appears within the type `std::cell::RefCell<std::fmt::Debug>`
- = note: required by `std::mem::size_of`
- 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