SHARE
TWEET

Untitled

a guest Aug 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mod thing {
  2.     pub trait TinyStr {
  3.         fn to_ascii_uppercase(self) -> Self;
  4.     }
  5.    
  6.     pub struct TinyStr4;
  7.     pub struct TinyStr8;
  8.    
  9.     impl TinyStr for TinyStr4 {
  10.       fn to_ascii_uppercase(self) -> Self {
  11.           Self
  12.       }
  13.     }
  14.  
  15.     impl TinyStr for TinyStr8 {
  16.       fn to_ascii_uppercase(self) -> Self {
  17.           Self
  18.       }
  19.     }
  20.    
  21. }
  22.  
  23. fn main() {
  24.     let s = thing::TinyStr4;
  25.     println!("{:?}", s.to_ascii_uppercase());
  26. }
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