blob: 2dd95eed097ca1301ea1de9e8007905709d290e1 [file] [log] [blame]
// Regression test making sure that indexing fails with an ambiguity
// error if one of the deref-steps encounters an inference variable.
fn main() {
let x = &Default::default();
//~^ ERROR type annotations needed for `&_`
x[1];
let _: &Vec<()> = x;
}