Guest User

Untitled

a guest
Oct 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. struct Foo<'a, T: 'a> {
  2. inner: &'a [T],
  3. }
  4.  
  5. impl <'a, T>Foo<'a, T> {
  6. pub fn new(inner: &'a [T]) -> Self {
  7. Foo { inner }
  8. }
  9. }
  10.  
  11. fn main() {
  12. let a = "a".to_string();
  13. let b = "b".to_string();
  14. let c = "c".to_string();
  15.  
  16. let _a = Foo::new(&[a, b, c]);
  17. }
Add Comment
Please, Sign In to add comment