-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
array impls <= 32 1.39 regression #65522
Comments
I guess this used to unsize to a slice? |
Formatting the first it points to this: error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> src/lib.rs:362:5
|
362 | pub data: [::std::os::raw::c_char; 128usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[i8; 128]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[i8; 128]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[i8; 128]`
= note: required for the cast to the object type `dyn std::fmt::Debug` in #[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct duk_thread_state {
pub data: [::std::os::raw::c_char; 128usize],
} And it fails to compile in Rust 1.37, 1.38 as well, so it's not a regression. Since this is generated code, it could be that it's a change in what code is being generated, but it seems unlikely? |
triage: P-high (at least to get to bottom of what actual bug is here) |
I tried to investigate a bit. The problematic code: #[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct duk_thread_state {
pub data: [::std::os::raw::c_char; 128usize],
} Does not compile in any compiler version after >1.0 (well, I only tested 1.30 -- 1.38, beta, nightly and 1.0, but I'm pretty sure that code was never accepted by the compiler). This piece of code is generated by However, the other regression, Maybe we could just ping someone from |
@LukasKalbertodt This is probably the same as the other bindgen-related regressions. According to @pcpthm in #65525:
I've not verified this, however. |
I noticed something else: the documentation on @ecstatic-morse I can't connect the bug you linked to what we are seeing here... but maybe it is indeed connected. |
You're right. Tested on godbolt I came to the same conclusion: https://rust.godbolt.org/z/uS3ST2 |
Indeed it seems like another case of |
assigning self to attempt to verify that this is fixed by upgrading |
Testing:
|
Testing:
|
closing as expected fallout from catching latent bug (now fixed) in |
https://crater-reports.s3.amazonaws.com/beta-1.39-1/beta-2019-09-28/reg/duktape_ffi_raw-2.30.0/log.txt
https://crater-reports.s3.amazonaws.com/beta-1.39-1/beta-2019-09-28/gh/docteurklein.inotify-sse/log.txt
cc #61415
cc #64962
The text was updated successfully, but these errors were encountered: