We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
debuginfo
1 parent 2015080 commit e319c2cCopy full SHA for e319c2c
tests/testsuite/profiles.rs
@@ -742,3 +742,36 @@ Caused by:
742
)
743
.run();
744
}
745
+
746
+#[cargo_test(nightly, reason = "debug options stabilized in 1.70")]
747
+fn debug_options_valid() {
748
+ for (option, cli) in [
749
+ ("line-directives-only", "line-directives-only"),
750
+ ("line-tables-only", "line-tables-only"),
751
+ ("none", "0"),
752
+ ("limited", "1"),
753
+ ("full", "2"),
754
+ ] {
755
+ let p = project()
756
+ .file(
757
+ "Cargo.toml",
758
+ &format!(
759
+ r#"
760
+ [package]
761
+ name = "foo"
762
+ authors = []
763
+ version = "0.0.0"
764
765
+ [profile.dev]
766
+ debug = "{option}"
767
+ "#
768
+ ),
769
+ )
770
+ .file("src/main.rs", "fn main() {}")
771
+ .build();
772
773
+ p.cargo("build -v")
774
+ .with_stderr_contains(&format!("[RUNNING] `rustc [..]-C debuginfo={cli} [..]"))
775
+ .run();
776
+ }
777
+}
0 commit comments