feat: add rust-script
This commit is contained in:
16
external/rust-script/tests/data/script-features.rs
vendored
Normal file
16
external/rust-script/tests/data/script-features.rs
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*!
|
||||
```cargo
|
||||
[features]
|
||||
dont-panic = []
|
||||
```
|
||||
*/
|
||||
#[cfg(feature="dont-panic")]
|
||||
fn main() {
|
||||
println!("--output--");
|
||||
println!("Keep calm and borrow check.");
|
||||
}
|
||||
|
||||
#[cfg(not(feature="dont-panic"))]
|
||||
fn main() {
|
||||
panic!("Do I really exist from an external, non-subjective point of view?");
|
||||
}
|
||||
Reference in New Issue
Block a user