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