2018-08-30 12:18:55 +00:00
|
|
|
//@ run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(path_statements)]
|
|
|
|
#![allow(unused_variables)]
|
2015-01-21 22:45:52 +00:00
|
|
|
// Regression test for issue #19499. Due to incorrect caching of trait
|
|
|
|
// results for closures with upvars whose types were not fully
|
|
|
|
// computed, this rather bizarre little program (along with many more
|
|
|
|
// reasonable examples) let to ambiguity errors about not being able
|
|
|
|
// to infer sufficient type information.
|
|
|
|
|
2015-03-22 20:13:15 +00:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2015-01-21 22:45:52 +00:00
|
|
|
fn main() {
|
|
|
|
let n = 0;
|
2015-02-18 10:42:01 +00:00
|
|
|
let it = Some(1_usize).into_iter().inspect(|_| {n;});
|
2015-01-21 22:45:52 +00:00
|
|
|
}
|