]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/needless_return.rs
Allow explicit returns with cfg attributes
[rust.git] / tests / run-pass / needless_return.rs
1 #[deny(warnings)]
2 fn cfg_return() -> i32 {
3     #[cfg(msvc)] return 1;
4     #[cfg(not(msvc))] return 2;
5 }
6
7 fn main() {
8     cfg_return();
9 }