2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
2018-08-31 08:02:01 -05:00
|
|
|
#![allow(stable_features)]
|
|
|
|
|
2015-06-23 01:08:44 -05:00
|
|
|
// Tests parallel codegen - this can fail if the symbol for the anonymous
|
|
|
|
// closure in `sum` pollutes the second codegen unit from the first.
|
|
|
|
|
|
|
|
// compile-flags: -C codegen_units=2
|
|
|
|
|
|
|
|
#![feature(iter_arith)]
|
|
|
|
|
|
|
|
mod a {
|
|
|
|
fn foo() {
|
|
|
|
let x = ["a", "bob", "c"];
|
|
|
|
let len: usize = x.iter().map(|s| s.len()).sum();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod b {
|
|
|
|
fn bar() {
|
|
|
|
let x = ["a", "bob", "c"];
|
|
|
|
let len: usize = x.iter().map(|s| s.len()).sum();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|