Created
June 23, 2013 00:28
-
-
Save rubber-duck/5843227 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
#[deriving(Clone)] | |
struct Foo<'self> | |
{ | |
foo: &'self str | |
} | |
fn main() { | |
} |
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
test.rs:1:11: 1:16 error: mismatched types: expected `&str` but found `&&'self str` (expected &str but found &-ptr) | |
test.rs:1 #[deriving(Clone)] | |
^~~~~ | |
error: aborting due to previous error |
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
#[deriving(Clone)] | |
struct Foo<'self> { | |
foo: &'self str, | |
} | |
#[doc = "Automatically derived."] | |
pub impl <'self> ::std::clone::Clone for Foo<'self> { | |
pub fn clone(&self) -> Foo<'self> { | |
match *self { | |
Foo{foo: ref __self_0_0} => Foo{foo: __self_0_0.clone(),} | |
} | |
} | |
} | |
fn main() { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment