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

With rustc 2015-03-28 nightly, error: slice pattern syntax experimental #351

Closed
andersk opened this issue Mar 28, 2015 · 1 comment · Fixed by #352
Closed

With rustc 2015-03-28 nightly, error: slice pattern syntax experimental #351

andersk opened this issue Mar 28, 2015 · 1 comment · Fixed by #352

Comments

@andersk
Copy link
Contributor

andersk commented Mar 28, 2015

rust-lang/rust#23794 put slice patterns behind a feature gate, so image no longer builds.

$ rustc --version
rustc 1.0.0-dev (built 2015-03-28)
$ cargo build
   Compiling image v0.3.1 (file:///home/anders/rust/image)
src/math/nq.rs:139:13: 139:25 error: slice pattern syntax is experimental
src/math/nq.rs:139             [r, g, b, a] => {
                               ^~~~~~~~~~~~
src/math/nq.rs:139:25: 139:25 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/math/nq.rs:154:13: 154:25 error: slice pattern syntax is experimental
src/math/nq.rs:154             [r, g, b, a] => {
                               ^~~~~~~~~~~~
src/math/nq.rs:154:25: 154:25 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/imageops/colorops.rs:138:19: 138:25 error: slice pattern syntax is experimental
src/imageops/colorops.rs:138         let &Luma([luma]) = color;
                                               ^~~~~~
src/imageops/colorops.rs:138:25: 138:25 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/imageops/colorops.rs:149:23: 149:37 error: slice pattern syntax is experimental
src/imageops/colorops.rs:149         let &mut Luma([ref mut luma]) = color;
                                                   ^~~~~~~~~~~~~~
src/imageops/colorops.rs:149:37: 149:37 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/tiff/decoder.rs:423:14: 423:29 error: slice pattern syntax is experimental
src/tiff/decoder.rs:423             ([ 8,  8,  8, 8],  PhotometricInterpretation::RGB) => Ok(ColorType::RGBA(8)),
                                     ^~~~~~~~~~~~~~~
src/tiff/decoder.rs:423:29: 423:29 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/tiff/decoder.rs:424:14: 424:26 error: slice pattern syntax is experimental
src/tiff/decoder.rs:424             ([ 8,  8,  8],     PhotometricInterpretation::RGB) => Ok(ColorType::RGB(8)),
                                     ^~~~~~~~~~~~
src/tiff/decoder.rs:424:26: 424:26 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/tiff/decoder.rs:425:14: 425:30 error: slice pattern syntax is experimental
src/tiff/decoder.rs:425             ([16, 16, 16, 16], PhotometricInterpretation::RGB) => Ok(ColorType::RGBA(16)),
                                     ^~~~~~~~~~~~~~~~
src/tiff/decoder.rs:425:30: 425:30 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/tiff/decoder.rs:426:14: 426:26 error: slice pattern syntax is experimental
src/tiff/decoder.rs:426             ([16, 16, 16],     PhotometricInterpretation::RGB) => Ok(ColorType::RGB(16)),
                                     ^~~~~~~~~~~~
src/tiff/decoder.rs:426:26: 426:26 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/tiff/decoder.rs:427:14: 427:18 error: slice pattern syntax is experimental
src/tiff/decoder.rs:427             ([ n], PhotometricInterpretation::BlackIsZero)
                                     ^~~~
src/tiff/decoder.rs:427:18: 427:18 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/tiff/decoder.rs:428:15: 428:19 error: slice pattern syntax is experimental
src/tiff/decoder.rs:428             |([ n], PhotometricInterpretation::WhiteIsZero) => Ok(ColorType::Gray(n)),
                                      ^~~~
src/tiff/decoder.rs:428:19: 428:19 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/color.rs:395:24: 395:39 error: slice pattern syntax is experimental
src/color.rs:395         let &mut LumaA([bg_luma, bg_a]) = self;
                                        ^~~~~~~~~~~~~~~
src/color.rs:395:39: 395:39 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/color.rs:396:20: 396:35 error: slice pattern syntax is experimental
src/color.rs:396         let &LumaA([fg_luma, fg_a]) = other;
                                    ^~~~~~~~~~~~~~~
src/color.rs:396:35: 396:35 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/color.rs:427:23: 427:47 error: slice pattern syntax is experimental
src/color.rs:427         let &mut Rgba([bg_r, bg_g, bg_b, bg_a]) = self;
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
src/color.rs:427:47: 427:47 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/color.rs:428:19: 428:43 error: slice pattern syntax is experimental
src/color.rs:428         let &Rgba([fg_r, fg_g, fg_b, fg_a]) = other;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~
src/color.rs:428:43: 428:43 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/color.rs:469:24: 469:30 error: slice pattern syntax is experimental
src/color.rs:469         let &mut LumaA([l, a]) = self;
                                        ^~~~~~
src/color.rs:469:30: 469:30 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/color.rs:479:23: 479:26 error: slice pattern syntax is experimental
src/color.rs:479         let &mut Luma([l]) = self;
                                       ^~~
src/color.rs:479:26: 479:26 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/color.rs:490:23: 490:35 error: slice pattern syntax is experimental
src/color.rs:490         let &mut Rgba([r, g, b, a]) = self;
                                       ^~~~~~~~~~~~
src/color.rs:490:35: 490:35 help: add #![feature(slice_patterns)] to the crate attributes to enable
src/color.rs:500:22: 500:31 error: slice pattern syntax is experimental
src/color.rs:500         let &mut Rgb([r, g, b]) = self;
                                      ^~~~~~~~~
src/color.rs:500:31: 500:31 help: add #![feature(slice_patterns)] to the crate attributes to enable
error: aborting due to 18 previous errors
Could not compile `image`.
@andersk
Copy link
Contributor Author

andersk commented Mar 29, 2015

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

Successfully merging a pull request may close this issue.

1 participant