-
-
Save Mic92/5564007 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use core::io::{BytesReader, BytesWriter}; | |
pub struct MockSocket { | |
recv: BytesReader, | |
send: BytesWriter | |
} | |
// Compile error | |
//test.rc:4:10: 4:21 error: Illegal anonymous lifetime: anonymous lifetimes are not permitted here | |
//test.rc:4 recv: BytesReader, | |
// ^~~~~~~~~~~ | |
//error: aborting due to previous error | |
// solution: | |
pub struct MockSocket<'self> { | |
recv: BytesReader<'self>, | |
send: BytesWriter | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment