tools/corrosion/test/rustflags/cargo_config_rustflags/src/main.rs
branchtransitional_engine
changeset 16050 6a3dc15b78b9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/corrosion/test/rustflags/cargo_config_rustflags/src/main.rs	Wed Aug 28 15:31:51 2024 +0200
@@ -0,0 +1,16 @@
+
+#[cfg(some_cargo_config_rustflag)]
+fn print_line() {
+    println!("Rustflag is enabled");
+}
+
+// test that local rustflags don't override global rustflags set via `.cargo/config`
+#[cfg(local_rustflag)]
+fn test_local_rustflag() {
+    println!("local_rustflag was enabled");
+}
+
+fn main() {
+    print_line();
+    test_local_rustflag();
+}