Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with closure members #20

Open
Boscop opened this issue Jun 4, 2017 · 0 comments
Open

Does not work with closure members #20

Boscop opened this issue Jun 4, 2017 · 0 comments
Labels

Comments

@Boscop
Copy link

Boscop commented Jun 4, 2017

#[derive(new)]
pub struct P<'a> {
	pub f: &'a Fn(f32) -> String,
}

/*
error: proc-macro derive panicked
  = help: message: Couldn't parse item: "failed to parse macro input: 
  \"pub struct P<\\\'a> {\\n    pub f: &\\\'a Fn(f32) -> String,\\n}\""
*/

Another example:

#[derive(new)]
pub struct P<S: Fn(f32) -> String> {
	pub f: S,
}
/*
error: proc-macro derive panicked
   = help: message: Couldn't parse item: "failed to parse macro input: 
   \"pub struct P<S: Fn(f32) -> String> {\\n    pub f: S,\\n}\""
*/
@nrc nrc added the bug label Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants