Skip to content

Instantly share code, notes, and snippets.

@Mic92
Forked from anonymous/test.rc
Last active December 17, 2015 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mic92/5564007 to your computer and use it in GitHub Desktop.
Save Mic92/5564007 to your computer and use it in GitHub Desktop.
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