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

Problem with deriving FromValueRef #27

Open
endeav0r opened this issue May 6, 2017 · 4 comments
Open

Problem with deriving FromValueRef #27

endeav0r opened this issue May 6, 2017 · 4 comments

Comments

@endeav0r
Copy link

endeav0r commented May 6, 2017

The following code:

#[derive(Clone, Debug, ForeignValue, FromValueRef, IntoValue)]
struct example {
    test: u64
}

Gives the error:

error[E0244]: wrong number of type arguments: expected 1, found 2
  --> <omitted>
   |
24 | #[derive(Clone, Debug, ForeignValue, FromValueRef, IntoValue)]
   |                  
@murarth
Copy link
Owner

murarth commented May 6, 2017

I'm not able to reproduce the error with the code you've given. Could you paste (or link to a gist) the entire file?

@endeav0r
Copy link
Author

endeav0r commented May 7, 2017

I attempted to create a reduced example for this, but was unable to reproduce. This issue does come up in a larger codebase though. If I figure out more, I'll re-open issue/re-report.

@endeav0r endeav0r closed this as completed May 7, 2017
@endeav0r
Copy link
Author

endeav0r commented May 7, 2017

Ok, the issue comes from having a pub struct, instead of just struct.

This will reproduce the issue:

extern crate ketos;
#[macro_use] extern crate ketos_derive;

#[derive(Clone, Debug, ForeignValue, FromValue, IntoValue)]
pub struct Example {
    test: u64
}

fn main () {
    
}

I apologize for the confusion earlier.

@endeav0r endeav0r reopened this May 7, 2017
@murarth
Copy link
Owner

murarth commented May 7, 2017

I'm still not able to duplicate this error. Taking a stab in the dark, I'd guess maybe there's a version difference problem going on. What version of ketos is your crate using? The latest version is 0.9.0.

I'm afraid it's very difficult to help diagnose the underlying cause without being able to see the entire codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants