Skip to content

bigger-arrays feature doesn't work #4

Description

@foltik

Cargo.toml

glsl-layout = { version = "0.3.2", features = ["bigger-arrays"] }

main.rs

use glsl_layout::AsStd140;

#[derive(Copy, Clone, AsStd140)]
struct MyStd140 {
    array: [f32; 256]
}

Gives the errors:

error[E0277]: the trait bound `[_GLSL_LAYOUT_MyStd140::_glsl_layout::Element<f32>; 256]: std::default::Default` is not satisfied
 --> src/main.rs:3:23
  |
3 | #[derive(Copy, Clone, AsStd140)]
  |                       ^^^^^^^^ the trait `std::default::Default` is not implemented for `[_GLSL_LAYOUT_MyStd140::_glsl_layout::Element<f32>; 256]`
  |
  = help: the following implementations were found:
            <&[T] as std::default::Default>
            <&mut [T] as std::default::Default>
            <[T; 0] as std::default::Default>
            <[T; 10] as std::default::Default>
          and 31 others
  = note: required by `std::default::Default::default`

error[E0277]: arrays only have std trait implementations for lengths 0..=32
 --> src/main.rs:3:23
  |
3 | #[derive(Copy, Clone, AsStd140)]
  |                       ^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[_GLSL_LAYOUT_MyStd140::_glsl_layout::Element<f32>; 256]`
  |
  = note: required because of the requirements on the impl of `std::fmt::Debug` for `[_GLSL_LAYOUT_MyStd140::_glsl_layout::Element<f32>; 256]`
  = note: required because of the requirements on the impl of `std::fmt::Debug` for `&[_GLSL_LAYOUT_MyStd140::_glsl_layout::Element<f32>; 256]`
  = note: required for the cast to the object type `dyn std::fmt::Debug`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions