Skip to content

failure to compile, error: the trait bound Self: std::marker::Sized is not satisfied #3

@zeryx

Description

@zeryx

Hey I'm pretty new with rust so this could be a non issue, but I was trying to use this library and test out the example code:

#[macro_use] extern crate rustml;
....
#[test]
fn ml_test () {
        let a = mat![
        1.0f32, 2.0;
        3.0, 4.0;
        5.0, 6.0
    ];
        let b = mat![
        5.0, 7.0;
        6.0, 2.0
    ];
        let c = (a * b).unwrap();
println!("{}", c);
}

But when I tried running my test I got this exception:

   Compiling rustml v0.0.5
/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/rustml-0.0.5/src/opencv/mod.rs:297:5: 297:76 error: the trait bound `Self: std::marker::Sized` is not satisfied [E0277]
/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/rustml-0.0.5/src/opencv/mod.rs:297     fn grid(images: &Vec<Self>, cols: usize, space: usize) -> Option<Self>;
                                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/rustml-0.0.5/src/opencv/mod.rs:297:5: 297:76 help: run `rustc --explain E0277` to see a detailed explanation
/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/rustml-0.0.5/src/opencv/mod.rs:297:5: 297:76 help: consider adding a `where Self: std::marker::Sized` bound
/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/rustml-0.0.5/src/opencv/mod.rs:297:5: 297:76 note: required by `std::vec::Vec`
error: aborting due to previous error
error: Could not compile `rustml`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions