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

Generating invalid code for aliases that do not use their template parameters #505

Closed
fitzgen opened this issue Feb 10, 2017 · 1 comment
Labels

Comments

@fitzgen
Copy link
Member

fitzgen commented Feb 10, 2017

Simplest test case:

// bindgen-flags: -- --std=c++14
template <typename T>
using always_int = int;

Generates:

/* automatically generated by rust-bindgen */

pub type always_int<T> = ::std::os::raw::c_int;

Which rustc rejects with:

error[E0091]: type parameter `T` is unused
 --> /home/fitzgen/scratch/always_int.rs:3:21
  |
3 | pub type always_int<T> = ::std::os::raw::c_int;
  |                     ^ unused type parameter
@fitzgen fitzgen added the bug label Feb 13, 2017
@fitzgen
Copy link
Member Author

fitzgen commented Mar 7, 2017

This is fixed in #544

@fitzgen fitzgen closed this as completed Mar 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

1 participant