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