Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Foo<'a, T: 'a> {
- inner: &'a [T],
- }
- impl <'a, T>Foo<'a, T> {
- pub fn new(inner: &'a [T]) -> Self {
- Foo { inner }
- }
- }
- fn main() {
- let a = "a".to_string();
- let b = "b".to_string();
- let c = "c".to_string();
- let _a = Foo::new(&[a, b, c]);
- }
Add Comment
Please, Sign In to add comment