SHARE
TWEET

Untitled

a guest Oct 17th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let x: TheStruct<String> = TheStruct::new();
  3. }
  4.  
  5. struct TheStruct<T> {
  6.     val: T,
  7. }
  8.  
  9. impl<String> TheStruct<String> {
  10.     fn new() -> Self {
  11.         let x = String::new();
  12.         TheStruct {
  13.             val: x
  14.         }
  15.     }
  16. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top