rust/tests/ui/issues/issue-3874.rs

13 lines
271 B
Rust
Raw Normal View History

//@ build-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
enum PureCounter { PureCounterVariant(usize) }
2012-11-01 22:14:31 +00:00
fn each<F>(thing: PureCounter, blk: F) where F: FnOnce(&usize) {
let PureCounter::PureCounterVariant(ref x) = thing;
2012-11-01 22:14:31 +00:00
blk(x);
}
pub fn main() {}