rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

Fix const array issue

Open rsammelson opened this issue 1 year ago • 8 comments

Fix #2683. Fairly hacky fix right now, but it doesn't seem to break any tests.

rsammelson avatar Nov 15 '23 17:11 rsammelson

@rsammelson can you explain the test changes? The diff shows these files changed

 .../tests/constified-enum-module-overflow.rs  | 15 ++++++++++++-
 .../tests/issue-544-stylo-creduce-2.rs        |  2 +-
 .../libclang-9/ptr32-has-different-size.rs    |  6 +++---
 .../expectations/tests/struct_typedef_ns.rs

But none of those seem to have anything to do with const/mut pointers

tgross35 avatar Jan 12 '24 21:01 tgross35

I'm not sure what caused that change, let me fix it.

rsammelson avatar Jan 12 '24 22:01 rsammelson

@tgross35 It should be fixed now.

rsammelson avatar Jan 12 '24 22:01 rsammelson

Thanks. Could you add a test for the change you made?

tgross35 avatar Jan 12 '24 22:01 tgross35

The changes before are because of newer libclang versions. We should update CI and expectations to newer libclang IMO. But not in this patch of course.

emilio avatar Jan 12 '24 23:01 emilio

@tgross35 I don't understand why the tests are failing.

rsammelson avatar Feb 19 '24 03:02 rsammelson

Yeah, the unused_imports don't seem like your fault. Maybe something in CI changed recently.

I'll test it out here https://github.com/rust-lang/rust-bindgen/pull/2763.

tgross35 avatar Feb 19 '24 03:02 tgross35

Not sure where those errors appeared from but the changes in https://github.com/rust-lang/rust-bindgen/pull/2763 seem to fix them. @emilio might know more.

You don't have to do anything except rebase whenever that is merged.

tgross35 avatar Feb 19 '24 03:02 tgross35

Not sure where those errors appeared from but the changes in #2763 seem to fix them. @emilio might know more.

Yeah, we use rust stable so whenever a rust update introduce warnings we hit this. Should be fixed now tho.

emilio avatar Feb 19 '24 16:02 emilio

(I tried to do it automatically, let's see)

emilio avatar Feb 19 '24 16:02 emilio