2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn sum(x: &[isize]) -> isize {
|
2013-01-22 19:20:08 -06:00
|
|
|
let mut sum = 0;
|
2015-01-31 11:20:46 -06:00
|
|
|
for y in x { sum += *y; }
|
2013-01-22 19:20:08 -06:00
|
|
|
return sum;
|
|
|
|
}
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn sum_mut(y: &mut [isize]) -> isize {
|
2013-01-22 19:20:08 -06:00
|
|
|
sum(y)
|
|
|
|
}
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn sum_imm(y: &[isize]) -> isize {
|
2013-01-22 19:20:08 -06:00
|
|
|
sum(y)
|
|
|
|
}
|
|
|
|
|
2013-02-04 13:07:36 -06:00
|
|
|
pub fn main() {}
|