]>
git.proxmox.com Git - rustc.git/blob - tests/ui/sepcomp/sepcomp-fns.rs
2 // compile-flags: -C codegen-units=3
4 // Test basic separate compilation functionality. The functions should be able
5 // to call each other even though they will be placed in different compilation
8 // Generate some code in the first compilation unit before declaring any
9 // modules. This ensures that the first module doesn't go into the same
10 // compilation unit as the top-level module.
12 fn one() -> usize { 1 }
15 pub fn two() -> usize {
21 pub fn three() -> usize {
28 assert_eq
!(a
::two(), 2);
29 assert_eq
!(b
::three(), 3);