Skip to content
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

Compiler error with the feature, image #79

Closed
IGreyGooI opened this issue Nov 10, 2021 · 2 comments
Closed

Compiler error with the feature, image #79

IGreyGooI opened this issue Nov 10, 2021 · 2 comments

Comments

@IGreyGooI
Copy link

How to reproduce:

compile a empty binary crate with the following dependency
vek = {version = "0.15", features = ["default", "image"]}

get compiler error when cargo check

error[E0046]: not all trait items implemented, missing: `CHANNEL_COUNT`, `COLOR_MODEL`, `COLOR_TYPE`, `to_bgr`, `to_bgra`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2235:9
     |
2235 | /         impl<T> Pixel for $Vec<T>
2236 | |             where T: ColorComponent + Copy + Clone + Primitive
2237 | |         {
2238 | |             type Subpixel = T;
...    |
2325 | |             }
2326 | |         }
     | |_________^ missing `CHANNEL_COUNT`, `COLOR_MODEL`, `COLOR_TYPE`, `to_bgr`, `to_bgra` in implementation
...
3288 |       vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |       ---------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
     = help: implement the missing item: `const CHANNEL_COUNT: u8 = 42;`
     = help: implement the missing item: `const COLOR_MODEL: &'static str = value;`
     = help: implement the missing item: `const COLOR_TYPE: ColorType = value;`
     = help: implement the missing item: `fn to_bgr(&self) -> Bgr<<Self as Pixel>::Subpixel> { todo!() }`
     = help: implement the missing item: `fn to_bgra(&self) -> Bgra<<Self as Pixel>::Subpixel> { todo!() }`

error[E0046]: not all trait items implemented, missing: `CHANNEL_COUNT`, `COLOR_MODEL`, `COLOR_TYPE`, `to_bgr`, `to_bgra`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2133:9
     |
2133 | /         impl<T> Pixel for $Vec<T>
2134 | |             where T: ColorComponent + Copy + Clone + Primitive
2135 | |         {
2136 | |             type Subpixel = T;
...    |
2222 | |             }
2223 | |         }
     | |_________^ missing `CHANNEL_COUNT`, `COLOR_MODEL`, `COLOR_TYPE`, `to_bgr`, `to_bgra` in implementation
...
3288 |       vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |       ---------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
     = help: implement the missing item: `const CHANNEL_COUNT: u8 = 42;`
     = help: implement the missing item: `const COLOR_MODEL: &'static str = value;`
     = help: implement the missing item: `const COLOR_TYPE: ColorType = value;`
     = help: implement the missing item: `fn to_bgr(&self) -> Bgr<<Self as Pixel>::Subpixel> { todo!() }`
     = help: implement the missing item: `fn to_bgra(&self) -> Bgra<<Self as Pixel>::Subpixel> { todo!() }`

error[E0046]: not all trait items implemented, missing: `CHANNEL_COUNT`, `COLOR_MODEL`, `COLOR_TYPE`, `to_bgr`, `to_bgra`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2235:9
     |
2235 | /         impl<T> Pixel for $Vec<T>
2236 | |             where T: ColorComponent + Copy + Clone + Primitive
2237 | |         {
2238 | |             type Subpixel = T;
...    |
2325 | |             }
2326 | |         }
     | |_________^ missing `CHANNEL_COUNT`, `COLOR_MODEL`, `COLOR_TYPE`, `to_bgr`, `to_bgra` in implementation
...
3296 |       vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |       ------------------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
     = help: implement the missing item: `const CHANNEL_COUNT: u8 = 42;`
     = help: implement the missing item: `const COLOR_MODEL: &'static str = value;`
     = help: implement the missing item: `const COLOR_TYPE: ColorType = value;`
     = help: implement the missing item: `fn to_bgr(&self) -> Bgr<<Self as Pixel>::Subpixel> { todo!() }`
     = help: implement the missing item: `fn to_bgra(&self) -> Bgra<<Self as Pixel>::Subpixel> { todo!() }`

error[E0046]: not all trait items implemented, missing: `CHANNEL_COUNT`, `COLOR_MODEL`, `COLOR_TYPE`, `to_bgr`, `to_bgra`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2133:9
     |
2133 | /         impl<T> Pixel for $Vec<T>
2134 | |             where T: ColorComponent + Copy + Clone + Primitive
2135 | |         {
2136 | |             type Subpixel = T;
...    |
2222 | |             }
2223 | |         }
     | |_________^ missing `CHANNEL_COUNT`, `COLOR_MODEL`, `COLOR_TYPE`, `to_bgr`, `to_bgra` in implementation
...
3296 |       vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |       ------------------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
     = help: implement the missing item: `const CHANNEL_COUNT: u8 = 42;`
     = help: implement the missing item: `const COLOR_MODEL: &'static str = value;`
     = help: implement the missing item: `const COLOR_TYPE: ColorType = value;`
     = help: implement the missing item: `fn to_bgr(&self) -> Bgr<<Self as Pixel>::Subpixel> { todo!() }`
     = help: implement the missing item: `fn to_bgra(&self) -> Bgra<<Self as Pixel>::Subpixel> { todo!() }`

error[E0599]: no variant or associated item named `RGBA` found for enum `ColorType` in the current scope
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2252:28
     |
2252 |                 ColorType::RGBA(Self::channel_count() * mem::size_of::<T>() as u8 * 8_u8)
     |                            ^^^^ variant or associated item not found in `ColorType`
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `vec::repr_c::rgba::image::Rgb<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2269:30
     |
2269 |                 image::Rgb { data: [self.r, self.g, self.b] }
     |                              ^^^^ field does not exist
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:376:5
     |
376  |     Rgb, 3, 0, "RGB", ColorType::Rgb8, ColorType::Rgb16, #[doc = "RGB colors"];
     |     --- `vec::repr_c::rgba::image::Rgb<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `vec::repr_c::rgba::image::Rgb<_>` is a tuple struct, use the appropriate syntax
     |
2269 |                 vec::repr_c::rgba::image::Rgb<_>(/* fields */)
     |

error[E0560]: struct `vec::repr_c::rgba::image::Rgba<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2272:31
     |
2272 |                 image::Rgba { data: [self.r, self.g, self.b, self.a] }
     |                               ^^^^ field does not exist
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:379:5
     |
379  |     Rgba, 4, 1, "RGBA", ColorType::Rgba8, ColorType::Rgba16, #[doc = "RGB colors + alpha channel"];
     |     ---- `vec::repr_c::rgba::image::Rgba<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `vec::repr_c::rgba::image::Rgba<_>` is a tuple struct, use the appropriate syntax
     |
2272 |                 vec::repr_c::rgba::image::Rgba<_>(/* fields */)
     |

error[E0560]: struct `Luma<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2277:24
     |
2277 |                 Luma { data: [c] }
     |                        ^^^^ field does not exist
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:378:5
     |
378  |     Luma, 1, 0, "Y", ColorType::L8, ColorType::L16, #[doc = "Grayscale colors"];
     |     ---- `Luma<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `Luma<_>` is a tuple struct, use the appropriate syntax
     |
2277 |                 Luma<_>(/* fields */)
     |

error[E0560]: struct `LumaA<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2280:25
     |
2280 |                 LumaA { data: [self.to_luma().data[0], self.a] }
     |                         ^^^^ field does not exist
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:381:5
     |
381  |     LumaA, 2, 1, "YA", ColorType::La8, ColorType::La16, #[doc = "Grayscale colors + alpha channel"];
     |     ----- `LumaA<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `LumaA<_>` is a tuple struct, use the appropriate syntax
     |
2280 |                 LumaA<_>(/* fields */)
     |

error[E0609]: no field `data` on type `Luma<T>`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2280:47
     |
2280 |                 LumaA { data: [self.to_luma().data[0], self.a] }
     |                                               ^^^^ unknown field
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
     = note: available fields are: `0`
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no variant or associated item named `RGB` found for enum `ColorType` in the current scope
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2150:28
     |
2150 |                 ColorType::RGB(Self::channel_count() * mem::size_of::<T>() as u8 * 8_u8)
     |                            ^^^ variant or associated item not found in `ColorType`
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `vec::repr_c::rgba::image::Rgb<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2167:30
     |
2167 |                 image::Rgb { data: [self.r, self.g, self.b] }
     |                              ^^^^ field does not exist
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:376:5
     |
376  |     Rgb, 3, 0, "RGB", ColorType::Rgb8, ColorType::Rgb16, #[doc = "RGB colors"];
     |     --- `vec::repr_c::rgba::image::Rgb<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `vec::repr_c::rgba::image::Rgb<_>` is a tuple struct, use the appropriate syntax
     |
2167 |                 vec::repr_c::rgba::image::Rgb<_>(/* fields */)
     |

error[E0560]: struct `vec::repr_c::rgba::image::Rgba<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2170:31
     |
2170 |                 image::Rgba { data: [self.r, self.g, self.b, T::full()] }
     |                               ^^^^ field does not exist
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:379:5
     |
379  |     Rgba, 4, 1, "RGBA", ColorType::Rgba8, ColorType::Rgba16, #[doc = "RGB colors + alpha channel"];
     |     ---- `vec::repr_c::rgba::image::Rgba<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `vec::repr_c::rgba::image::Rgba<_>` is a tuple struct, use the appropriate syntax
     |
2170 |                 vec::repr_c::rgba::image::Rgba<_>(/* fields */)
     |

error[E0560]: struct `Luma<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2175:24
     |
2175 |                 Luma { data: [c] }
     |                        ^^^^ field does not exist
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:378:5
     |
378  |     Luma, 1, 0, "Y", ColorType::L8, ColorType::L16, #[doc = "Grayscale colors"];
     |     ---- `Luma<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `Luma<_>` is a tuple struct, use the appropriate syntax
     |
2175 |                 Luma<_>(/* fields */)
     |

error[E0560]: struct `LumaA<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2178:25
     |
2178 |                 LumaA { data: [self.to_luma().data[0], T::full()] }
     |                         ^^^^ field does not exist
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:381:5
     |
381  |     LumaA, 2, 1, "YA", ColorType::La8, ColorType::La16, #[doc = "Grayscale colors + alpha channel"];
     |     ----- `LumaA<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `LumaA<_>` is a tuple struct, use the appropriate syntax
     |
2178 |                 LumaA<_>(/* fields */)
     |

error[E0609]: no field `data` on type `Luma<T>`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2178:47
     |
2178 |                 LumaA { data: [self.to_luma().data[0], T::full()] }
     |                                               ^^^^ unknown field
...
3288 |     vec_impl_all_vecs!{c #[repr(C)] c #[repr(C)] repr_c}
     |     ---------------------------------------------------- in this macro invocation
     |
     = note: available fields are: `0`
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no variant or associated item named `RGBA` found for enum `ColorType` in the current scope
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2252:28
     |
2252 |                 ColorType::RGBA(Self::channel_count() * mem::size_of::<T>() as u8 * 8_u8)
     |                            ^^^^ variant or associated item not found in `ColorType`
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `vec::repr_c::rgba::image::Rgb<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2269:30
     |
2269 |                 image::Rgb { data: [self.r, self.g, self.b] }
     |                              ^^^^ field does not exist
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:376:5
     |
376  |     Rgb, 3, 0, "RGB", ColorType::Rgb8, ColorType::Rgb16, #[doc = "RGB colors"];
     |     --- `vec::repr_c::rgba::image::Rgb<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `vec::repr_c::rgba::image::Rgb<_>` is a tuple struct, use the appropriate syntax
     |
2269 |                 vec::repr_c::rgba::image::Rgb<_>(/* fields */)
     |

error[E0560]: struct `vec::repr_c::rgba::image::Rgba<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2272:31
     |
2272 |                 image::Rgba { data: [self.r, self.g, self.b, self.a] }
     |                               ^^^^ field does not exist
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:379:5
     |
379  |     Rgba, 4, 1, "RGBA", ColorType::Rgba8, ColorType::Rgba16, #[doc = "RGB colors + alpha channel"];
     |     ---- `vec::repr_c::rgba::image::Rgba<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `vec::repr_c::rgba::image::Rgba<_>` is a tuple struct, use the appropriate syntax
     |
2272 |                 vec::repr_c::rgba::image::Rgba<_>(/* fields */)
     |

error[E0560]: struct `Luma<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2277:24
     |
2277 |                 Luma { data: [c] }
     |                        ^^^^ field does not exist
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:378:5
     |
378  |     Luma, 1, 0, "Y", ColorType::L8, ColorType::L16, #[doc = "Grayscale colors"];
     |     ---- `Luma<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `Luma<_>` is a tuple struct, use the appropriate syntax
     |
2277 |                 Luma<_>(/* fields */)
     |

error[E0560]: struct `LumaA<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2280:25
     |
2280 |                 LumaA { data: [self.to_luma().data[0], self.a] }
     |                         ^^^^ field does not exist
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:381:5
     |
381  |     LumaA, 2, 1, "YA", ColorType::La8, ColorType::La16, #[doc = "Grayscale colors + alpha channel"];
     |     ----- `LumaA<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `LumaA<_>` is a tuple struct, use the appropriate syntax
     |
2280 |                 LumaA<_>(/* fields */)
     |

error[E0609]: no field `data` on type `Luma<T>`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2280:47
     |
2280 |                 LumaA { data: [self.to_luma().data[0], self.a] }
     |                                               ^^^^ unknown field
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
     = note: available fields are: `0`
     = note: this error originates in the macro `vec_impl_pixel_rgba` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no variant or associated item named `RGB` found for enum `ColorType` in the current scope
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2150:28
     |
2150 |                 ColorType::RGB(Self::channel_count() * mem::size_of::<T>() as u8 * 8_u8)
     |                            ^^^ variant or associated item not found in `ColorType`
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0560]: struct `vec::repr_c::rgba::image::Rgb<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2167:30
     |
2167 |                 image::Rgb { data: [self.r, self.g, self.b] }
     |                              ^^^^ field does not exist
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:376:5
     |
376  |     Rgb, 3, 0, "RGB", ColorType::Rgb8, ColorType::Rgb16, #[doc = "RGB colors"];
     |     --- `vec::repr_c::rgba::image::Rgb<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `vec::repr_c::rgba::image::Rgb<_>` is a tuple struct, use the appropriate syntax
     |
2167 |                 vec::repr_c::rgba::image::Rgb<_>(/* fields */)
     |

error[E0560]: struct `vec::repr_c::rgba::image::Rgba<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2170:31
     |
2170 |                 image::Rgba { data: [self.r, self.g, self.b, T::full()] }
     |                               ^^^^ field does not exist
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:379:5
     |
379  |     Rgba, 4, 1, "RGBA", ColorType::Rgba8, ColorType::Rgba16, #[doc = "RGB colors + alpha channel"];
     |     ---- `vec::repr_c::rgba::image::Rgba<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `vec::repr_c::rgba::image::Rgba<_>` is a tuple struct, use the appropriate syntax
     |
2170 |                 vec::repr_c::rgba::image::Rgba<_>(/* fields */)
     |

error[E0560]: struct `Luma<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2175:24
     |
2175 |                 Luma { data: [c] }
     |                        ^^^^ field does not exist
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:378:5
     |
378  |     Luma, 1, 0, "Y", ColorType::L8, ColorType::L16, #[doc = "Grayscale colors"];
     |     ---- `Luma<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `Luma<_>` is a tuple struct, use the appropriate syntax
     |
2175 |                 Luma<_>(/* fields */)
     |

error[E0560]: struct `LumaA<T>` has no field named `data`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2178:25
     |
2178 |                 LumaA { data: [self.to_luma().data[0], T::full()] }
     |                         ^^^^ field does not exist
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
    ::: C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\image-0.23.14\./src\color.rs:381:5
     |
381  |     LumaA, 2, 1, "YA", ColorType::La8, ColorType::La16, #[doc = "Grayscale colors + alpha channel"];
     |     ----- `LumaA<_>` defined here
     |
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `LumaA<_>` is a tuple struct, use the appropriate syntax
     |
2178 |                 LumaA<_>(/* fields */)
     |

error[E0609]: no field `data` on type `Luma<T>`
    --> C:\Users\greygoo\.cargo\registry\src\github.com-1ecc6299db9ec823\vek-0.15.1\src\vec.rs:2178:47
     |
2178 |                 LumaA { data: [self.to_luma().data[0], T::full()] }
     |                                               ^^^^ unknown field
...
3296 |     vec_impl_all_vecs!{simd #[repr(simd)] c #[repr(C)] repr_simd}
     |     ------------------------------------------------------------- in this macro invocation
     |
     = note: available fields are: `0`
     = note: this error originates in the macro `vec_impl_pixel_rgb` (in Nightly builds, run with -Z macro-backtrace for more info)
@yoanlcq
Copy link
Owner

yoanlcq commented Nov 11, 2021

Hi, thanks for the report. It appears I had increased the image dependency's version to latest at some point, but I was a bit too confident that it would still compile. Sorry about that.

The fix has been published as version 0.15.3. Please let me know if you encounter any issues, or have any remarks or comments!

Thanks,

@yoanlcq
Copy link
Owner

yoanlcq commented Nov 11, 2021

Btw, please be careful not to use the Pixel trait on vectors where T is anything other than u8 and u16; otherwise, the COLOR_TYPE will give wrong information.

I didn't see this as a problem back then, because one could specify the bit depth procedurally.
A real "safe" fix would be to implement Pixel only if T is u8 or u16, but that's a bit involved and is a breaking change; so I'd rather delay working on that, until someone does complain.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants