Skip to content

Commit f14da1e

Browse files
committed
Fix the ICE
1 parent 678346e commit f14da1e

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/gl_generator/generators/global_gen.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,19 @@ fn write_fnptr_struct_def(ecx: &ExtCtxt) -> Vec<P<ast::Item>> {
130130
vec![
131131
(quote_item!(ecx,
132132
pub struct FnPtr {
133-
/// The function pointer that will be used when calling the function.
133+
// TODO: put back doccomment
134+
// The function pointer that will be used when calling the function.
134135
f: *const __gl_imports::libc::c_void,
135-
/// True if the pointer points to a real function, false if points to a `panic!` fn.
136+
// TODO: put back doccomment
137+
// True if the pointer points to a real function, false if points to a `panic!` fn.
136138
is_loaded: bool,
137139
}
138140
)).unwrap(),
139141

140142
(quote_item!(ecx,
141143
impl FnPtr {
142-
/// Creates a `FnPtr` from a load attempt.
144+
// TODO: put back doccomment
145+
// Creates a `FnPtr` from a load attempt.
143146
pub fn new(ptr: *const __gl_imports::libc::c_void, failing_fn: *const __gl_imports::libc::c_void) -> FnPtr {
144147
if ptr.is_null() {
145148
FnPtr { f: failing_fn, is_loaded: false }

src/gl_generator/generators/struct_gen.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,19 @@ fn write_fnptr_struct_def(ecx: &ExtCtxt) -> Vec<P<ast::Item>> {
8080
(quote_item!(ecx,
8181
#[allow(dead_code)]
8282
pub struct FnPtr {
83-
/// The function pointer that will be used when calling the function.
83+
// TODO: put back doccomment
84+
// The function pointer that will be used when calling the function.
8485
f: *const __gl_imports::libc::c_void,
85-
/// True if the pointer points to a real function, false if points to a `panic!` fn.
86+
// TODO: put back doccomment
87+
// True if the pointer points to a real function, false if points to a `panic!` fn.
8688
is_loaded: bool,
8789
}
8890
)).unwrap(),
8991

9092
(quote_item!(ecx,
9193
impl FnPtr {
92-
/// Creates a `FnPtr` from a load attempt.
94+
// TODO: put back doccomment
95+
// Creates a `FnPtr` from a load attempt.
9396
fn new(ptr: *const __gl_imports::libc::c_void,
9497
failing_fn: *const __gl_imports::libc::c_void) -> FnPtr {
9598
if ptr.is_null() {
@@ -99,9 +102,10 @@ fn write_fnptr_struct_def(ecx: &ExtCtxt) -> Vec<P<ast::Item>> {
99102
}
100103
}
101104

102-
/// Returns `true` if the function has been successfully loaded.
103-
///
104-
/// If it returns `false`, calling the corresponding function will fail.
105+
// TODO: put back doccomment
106+
// Returns `true` if the function has been successfully loaded.
107+
//
108+
// If it returns `false`, calling the corresponding function will fail.
105109
#[inline]
106110
#[allow(dead_code)]
107111
pub fn is_loaded(&self) -> bool {

0 commit comments

Comments
 (0)