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

Broken MIR: bad DropAndReplace #39363

Closed
kornelski opened this issue Jan 28, 2017 · 1 comment
Closed

Broken MIR: bad DropAndReplace #39363

kornelski opened this issue Jan 28, 2017 · 1 comment
Assignees

Comments

@kornelski
Copy link
Contributor

warning: broken MIR (Terminator { source_info: SourceInfo { span: src/bin/test.rs:10:5: 10:15, scope: scope3 }, kind: replace(_1 <- _9) -> [return: bb15, unwind: bb14] }): bad DropAndReplace (std::option::Option<image::ImageBuffer<image::Luma, std::vec::Vec<<image::Luma as image::Pixel>::Subpixel>>> = std::option::Option<image::ImageBuffer<image::Luma, std::vec::Vec>>): Sorts(ExpectedFound { expected: <image::Luma as image::Pixel>::Subpixel, found: u8 })
--> src/bin/test.rs:10:18
|
10 | reassigned = Some(returned);
| ^^^^^^^^^^^^^^

extern crate imageproc;
extern crate image;

fn main() {
    let mut reassigned: Option<imageproc::definitions::VecBuffer<image::Luma<u8>>> = None;

    let img = image::ImageBuffer::from_raw(1, 1, Vec::new()).unwrap();
    let returned = imageproc::filter::box_filter(&img, 3, 3);

    reassigned = Some(returned);
}

rustc 1.16.0-nightly (df8debf 2017-01-25)

[[package]]
name = "imageproc"
version = "0.7.0"

[[package]]
name = "image"
version = "0.12.2"
@kornelski
Copy link
Contributor Author

I've found the type should be image::ImageBuffer<image::Luma<u8>, std::vec::Vec<u8>>, so it's probably related to #38135

@arielb1 arielb1 self-assigned this Feb 28, 2017
arielb1 added a commit to arielb1/rust that referenced this issue Mar 1, 2017
bors added a commit that referenced this issue Mar 4, 2017
More through normalization, Feb/Mar 2017 edition

Fix a few normalization bugs.

Fixes #27901.
Fixes #28828.
Fixes #38135.
Fixes #39363.
Fixes #39367.
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