SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #![no_std]
  2.  
  3. extern crate alloc;
  4.  
  5. /// ```
  6. /// assert_eq!(playground::foo().to_string(), "5".to_owned())
  7. /// ```
  8. pub fn foo() -> alloc::boxed::Box<dyn core::fmt::Display> {
  9.     alloc::boxed::Box::new(5)
  10. }
  11.  
  12. /// ```
  13. /// assert_eq!(playground::bar().to_string(), "5".to_owned());
  14. /// ```
  15. pub fn bar() -> impl core::fmt::Display {
  16.     5
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top