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

thread 'main' panicked at 'BindGroupDescriptor is not generic' #573

Closed
ncharlton02 opened this issue Sep 20, 2020 · 5 comments
Closed

thread 'main' panicked at 'BindGroupDescriptor is not generic' #573

ncharlton02 opened this issue Sep 20, 2020 · 5 comments

Comments

@ncharlton02
Copy link

Version: 0.14.5
Rust: Rust 1.46 Stable / Rust Nightly

thread 'main' panicked at 'BindGroupDescriptor is not generic', ... \cbindgen-0.14.5\src\bindgen\ir\structure.rs:369:9

See CI Build: https://github.com/DevOrc/wgpu-native/runs/1140985652?check_suite_focus=true

Reproduce:
Run make ffi/wgpu.h on https://github.com/DevOrc/wgpu-native/tree/cbindgen-issue

@emilio
Copy link
Collaborator

emilio commented Sep 21, 2020

Is this a regression?

@ncharlton02
Copy link
Author

No - same issue on 0.14.4

@ncharlton02
Copy link
Author

ncharlton02 commented Sep 26, 2020

Here is a minimal test case:

pub type Foo = generic::Foo<u32>;

mod generic {
    pub struct Foo<T> {
        foo: T,
    }
}

mod structure {
    #[repr(C)]
    pub struct Foo{
        foo: u32
    }
}

Note: this only panics when the language is set to C

@emilio
Copy link
Collaborator

emilio commented Sep 28, 2020

I see, I think that's "just" #7... We're probably getting confused about what of the two types we're referencing. We could potentially fail more gracefully here without much issue.

@emilio
Copy link
Collaborator

emilio commented Oct 13, 2020

Closing as a dupe of #7... You might want to /// cbindgen:ignore the generic type or such, I agree it's an unfortunate limitation.

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