-
Notifications
You must be signed in to change notification settings - Fork 776
Closed
Description
Input C/C++ Header
template <class T> class RefPtr { T a; };
template <class T> class nsMainThreadPtrHolder { T a; };
template <class T> class nsMainThreadPtrHandle {
RefPtr<nsMainThreadPtrHolder<T>> mPtr;
};Bindgen Invokation
Complicated, will get back with a minimal invokation in a bit.
Actual Results
/* automatically generated by rust-bindgen */
pub use self::root::*;
pub use self::root::mozilla::*;
pub use self::root::mozilla::css::*;
pub use self::root::mozilla::dom::*;
use atomic_refcell::AtomicRefCell;
use data::ElementData;
pub type ServoUnsafeCell<T> = ::std::cell::UnsafeCell<T>;
pub type ServoCell<T> = ::std::cell::Cell<T>;
pub type ServoNodeData = AtomicRefCell<ElementData>;
#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
pub mod root {
#[allow(unused_imports)]
use self::super::root;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RefPtr<T> {
pub a: T,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nsMainThreadPtrHolder<T> {
pub a: T,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nsMainThreadPtrHandle {
pub mPtr: root::RefPtr<root::nsMainThreadPtrHolder<T>>,
}
}Which results in compilation errors like
error[E0412]: cannot find type `T` in this scope
--> stylo_structs.rs:30:60
|
30 | pub mPtr: root::RefPtr<root::nsMainThreadPtrHolder<T>>,
| ^ not found in this scope
-->
Expected Results
Some compilation errors from the raw-line insertions, but all type parameters that get referenced should exist.