Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- println!("{:?}", {
- std::mem::size_of_val::<std::cell::RefCell<dyn std::fmt::Debug>>(std::cell::RefCell::new(10))
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error[E0308]: mismatched types
- --> src/main.rs:5:74
- |
- 5 | std::mem::size_of_val::<std::cell::RefCell<dyn std::fmt::Debug>>(std::cell::RefCell::new(10))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- | |
- | expected reference, found struct `std::cell::RefCell`
- | help: consider borrowing here: `&std::cell::RefCell::new(10)`
- |
- = note: expected type `&std::cell::RefCell<std::fmt::Debug>`
- found type `std::cell::RefCell<{integer}>`
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0308`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Add Comment
Please, Sign In to add comment