blob: 2dd95eed097ca1301ea1de9e8007905709d290e1 (
plain)
1
2
3
4
5
6
7
8
9
|
// 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;
}
|