SHARE
TWEET

Untitled

a guest Aug 14th, 2019 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //#![no_std]
  2.  
  3. struct Outer<'a> {
  4.     buffer: [u8; 20],
  5.     inner: Inner<'a>,
  6. }
  7.  
  8. impl<'a> Outer<'a> {
  9.     fn test(&mut self) {
  10.         self.inner = Inner::<'a> {
  11.             buffer: &[1,2,3,4]
  12.         };
  13.     }
  14. }
  15.  
  16. struct Inner<'a> {
  17.     buffer: &'a [u8],
  18. }
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