]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/returns.rs
Move all our tests back to ui tests
[rust.git] / tests / run-pass / returns.rs
1 #[deny(warnings)]
2 fn cfg_return() -> i32 {
3     #[cfg(unix)] return 1;
4     #[cfg(not(unix))] return 2;
5 }
6
7 #[deny(warnings)]
8 fn cfg_let_and_return() -> i32 {
9     #[cfg(unix)]
10     let x = 1;
11     #[cfg(not(unix))]
12     let x = 2;
13     x
14 }
15
16 fn main() {
17     cfg_return();
18     cfg_let_and_return();
19 }