1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // A variant of the first "spike" test that serves to test the
12 // `rustc_partition_reused` and `rustc_partition_codegened` tests.
13 // Here we change and say that the `y` module will be codegened (when
14 // in fact it will not), and then indicate that the test itself
15 // should-fail (because an error will be reported, and hence the
16 // revision rpass2 will not compile, despite being named rpass).
18 // revisions:rpass1 rpass2
21 #![feature(rustc_attrs)]
23 #![rustc_partition_reused(module="spike_neg2", cfg="rpass2")]
24 #![rustc_partition_codegened(module="spike_neg2-x", cfg="rpass2")]
25 #![rustc_partition_codegened(module="spike_neg2-y", cfg="rpass2")] // this is wrong!
46 pub fn sum(x: &X) -> u32 {
54 pub fn assert_sum() -> bool {