rust/tests/ui/issues/issue-43420-no-over-suggest.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
259 B
Rust
Raw Normal View History

// 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 06:13:27 -06:00
foo(&a); //~ ERROR mismatched types
}