Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement