1 // Regression test for #42602. It used to be that we had
4 // typeck(foo) -> FnOnce -> typeck(bar)
6 // This was fixed by improving the resolution of the `FnOnce` trait
9 // revisions:cfail1 cfail2 cfail3
10 // compile-flags:-Zquery-dep-graph
11 // build-pass (FIXME(62277): could be check-pass?)
13 #![feature(rustc_attrs)]
23 let x = vec![1, 2, 3];
24 let v = || ::std::mem::drop(x);
30 let x = vec![1, 2, 3, 4];
31 let v = || ::std::mem::drop(x);
37 #[rustc_clean(cfg="cfail2")]
38 #[rustc_clean(cfg="cfail3")]
40 let x = vec![1, 2, 3];
41 let v = || ::std::mem::drop(x);