rust/tests/pretty/for-comment.rs

12 lines
194 B
Rust
Raw Normal View History

// compile-flags: --crate-type=lib
2013-07-05 00:56:54 -05:00
// pp-exact
fn f(v: &[isize]) -> isize {
2013-07-05 00:56:54 -05:00
let mut n = 0;
2015-01-31 11:20:46 -06:00
for e in v {
2013-07-05 00:56:54 -05:00
n = *e; // This comment once triggered pretty printer bug
}
2013-08-17 10:37:42 -05:00
n
2013-07-05 00:56:54 -05:00
}