2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(path_statements)]
|
|
|
|
#![allow(unused_variables)]
|
2015-01-21 17:45:52 -05: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 13:13:15 -07:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2015-01-21 17:45:52 -05:00
|
|
|
fn main() {
|
|
|
|
let n = 0;
|
2015-02-18 05:42:01 -05:00
|
|
|
let it = Some(1_usize).into_iter().inspect(|_| {n;});
|
2015-01-21 17:45:52 -05:00
|
|
|
}
|