Repository: brendanzab/gl-rs (language: rust)

Issue:
Type conversion not handled for `const EGLattrib *`
Updating mozangle from gl_generator 0.10 to gl_generator 0.11 yielded this:
```
thread 'main' panicked at 'Type conversion not implemented for `const EGLattrib *`', C:\Users\appveyor\.cargo\registry\src\github.com-1ecc6299db9ec823\gl_generator-0.11.0\registry\parse.rs:1096:14
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
Relevant code is here: https://github.com/servo/mozangle/blob/d128b81faaabd6d09d0aed3aafc2fecabc238667/build.rs#L121-L148


Discussion / hints:
Ooh, we'll need to add an entry to this part:

https://github.com/brendanzab/gl-rs/blob/728f568a640361e5f6ba0b462fbed49d47c4c2de/gl_generator/registry/parse.rs#L800-L1100

Not sure how we can ensure we test this in the future, been a bit of a while since I looked at gl-rs. 🤔 
Ok so I think this is a typo in the `khronos_api/api_angle/scripts/egl_angle_ext.xml` file which is still present as I'm writing the message.

`<param>const <ptype>EGLattrib</ptype> *<name>attrib_list</name></param>` is the only mention of `EGLattrib` I can find, all the others are properly capitalized. I'm not sure if the fix is to get it fixed upstream, to add the `EGLattrib` typo in the parser or both
Thanks for investigating! Perhaps we could add another case to the above match:

```diff,rust
  "const EGLAttrib *" => "*const types::EGLAttrib", 
+ "const EGLattrib *" => "*const types::EGLAttrib", // Due to a typo in khronos_api/api_angle/scripts/egl_angle_ext.xml - see brendanzab/gl-rs#491
  "EGLConfig" => "types::EGLConfig",
```

Perhaps we could try to upstream a fix to the khronos angle api too?
Also wondering why our tests are not picking up this issue? Support for the ANGLE extensions was added in #480 🤔 

Fix patch:
diff --git a/gl_generator/Cargo.toml b/gl_generator/Cargo.toml
index f3af1ea5..daf569b4 100644
--- a/gl_generator/Cargo.toml
+++ b/gl_generator/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "gl_generator"
-version = "0.13.0"
+version = "0.13.1"
 authors = [
     "Brendan Zabarauskas <bjzaba@yahoo.com.au>",
     "Corey Richardson",
diff --git a/gl_generator/registry/parse.rs b/gl_generator/registry/parse.rs
index 10740ca4..c1a11a6c 100644
--- a/gl_generator/registry/parse.rs
+++ b/gl_generator/registry/parse.rs
@@ -1041,6 +1041,7 @@ pub fn to_rust_ty<T: AsRef<str>>(ty: T) -> Cow<'static, str> {
         "EGLAttrib" => "types::EGLAttrib",
         "EGLAttrib *" => "*mut types::EGLAttrib",
         "const EGLAttrib *" => "*const types::EGLAttrib",
+        "const EGLattrib *" => "*const types::EGLAttrib", // Due to a typo in khronos_api/api_angle/scripts/egl_angle_ext.xml - see brendanzab/gl-rs#491
         "EGLConfig" => "types::EGLConfig",
         "EGLConfig *" => "*mut types::EGLConfig",
         "EGLContext" => "types::EGLContext",


Test patch: