Closed
Description
trait Foo {}
impl Foo for int {}
fn foo(_: &[&Foo]) {}
fn main() {
foo([&1i, &2i]);
}
fails to compile:
test.rs:8:8: 8:18 error: mismatched types: expected `&[&Foo<no-bounds>]` but found `[&int, .. 2]` (expected trait Foo but found &-ptr)
test.rs:8 foo([&1i, &2i]);
^~~~~~~~~~
error: aborting due to previous error
task 'rustc' failed at 'explicit failure', /Users/sfackler/rust/rust/src/libsyntax/diagnostic.rs:102
task '<main>' failed at 'explicit failure', /Users/sfackler/rust/rust/src/librustc/lib.rs:441