2017-08-16 21:23:44 +03:00
|
|
|
// check that we substitute type parameters before we suggest anything - otherwise
|
|
|
|
// we would suggest function such as `as_slice` for the `&[u16]`.
|
|
|
|
|
|
|
|
fn foo(b: &[u16]) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a: Vec<u8> = Vec::new();
|
2017-11-20 13:13:27 +01:00
|
|
|
foo(&a); //~ ERROR mismatched types
|
2017-08-16 21:23:44 +03:00
|
|
|
}
|