blob: 6a5e5b9c224b925e51c088e7ff1837739a1dcfb1 [file] [log] [blame]
Inna Palantff3f07a2019-07-11 16:15:26 -07001// run-pass
2// Test that the type variable in the type(`Vec<_>`) of a closed over
3// variable does not interfere with type inference.
4
5fn f<F: FnMut()>(mut f: F) {
6 f();
7}
8
9fn main() {
10 let mut v: Vec<_> = vec![];
11 f(|| v.push(0));
12 assert_eq!(v, [0]);
13}