about summary refs log tree commit diff
path: root/tests/debuginfo
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2024-04-26 05:08:12 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2024-04-26 05:08:12 +0000
commit4be9c689f6601c4359f018ddec52a7dec9a8ac66 (patch)
treef56969ba1a30728239bb8db65a17fea1ad06bbdf /tests/debuginfo
parent4dcc2fac06a2d9194a05853482dcdf6d453f251d (diff)
parent6acb9e75ebc936df737381a9d0b7a7bccd6f0b2f (diff)
downloadrust-4be9c689f6601c4359f018ddec52a7dec9a8ac66.tar.gz
rust-4be9c689f6601c4359f018ddec52a7dec9a8ac66.zip
Merge from rustc
Diffstat (limited to 'tests/debuginfo')
-rw-r--r--tests/debuginfo/collapse-debuginfo-external-attr.rs1
-rw-r--r--tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs3
-rw-r--r--tests/debuginfo/collapse-debuginfo-external-flag.rs3
-rw-r--r--tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs4
-rw-r--r--tests/debuginfo/collapse-debuginfo-no-attr-flag.rs61
-rw-r--r--tests/debuginfo/collapse-debuginfo-no-attr.rs7
-rw-r--r--tests/debuginfo/collapse-debuginfo-with-attr-flag.rs12
-rw-r--r--tests/debuginfo/collapse-debuginfo-with-attr.rs5
-rw-r--r--tests/debuginfo/collapse-debuginfo-with-yes-flag.rs5
-rw-r--r--tests/debuginfo/lexical-scope-with-macro.rs2
-rw-r--r--tests/debuginfo/macro-stepping.rs2
-rw-r--r--tests/debuginfo/skip_second_statement.rs3
-rw-r--r--tests/debuginfo/skip_second_statement_collapse.rs4
13 files changed, 20 insertions, 92 deletions
diff --git a/tests/debuginfo/collapse-debuginfo-external-attr.rs b/tests/debuginfo/collapse-debuginfo-external-attr.rs
index fba609bf89e..4d4fa92726f 100644
--- a/tests/debuginfo/collapse-debuginfo-external-attr.rs
+++ b/tests/debuginfo/collapse-debuginfo-external-attr.rs
@@ -1,5 +1,4 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
 // Test that local macro debug info is not collapsed with #[collapse_debuginfo(external)]
 
diff --git a/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs b/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs
index 51aa1f8ce19..ab0ae8fef4d 100644
--- a/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs
+++ b/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs
@@ -1,10 +1,9 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
 // Test that macro attribute #[collapse_debuginfo(no)]
 // overrides "collapse_macro_debuginfo=external" flag
 
-//@ compile-flags:-g -Z collapse_macro_debuginfo=external
+//@ compile-flags:-g -C collapse_macro_debuginfo=external
 
 // === GDB TESTS ===================================================================================
 
diff --git a/tests/debuginfo/collapse-debuginfo-external-flag.rs b/tests/debuginfo/collapse-debuginfo-external-flag.rs
index f9ef1ae8a25..b8e73d227b3 100644
--- a/tests/debuginfo/collapse-debuginfo-external-flag.rs
+++ b/tests/debuginfo/collapse-debuginfo-external-flag.rs
@@ -1,9 +1,8 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
 // Test that println macro debug info is collapsed with "collapse_macro_debuginfo=external" flag
 
-//@ compile-flags:-g -Z collapse_macro_debuginfo=external
+//@ compile-flags:-g -C collapse_macro_debuginfo=external
 
 // === GDB TESTS ===================================================================================
 
diff --git a/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs b/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs
index e67e1d83cdc..1aafcffa304 100644
--- a/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs
+++ b/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs
@@ -1,11 +1,9 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
 // Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo.
 // When nested macros instantiations are tagged with collapse_debuginfo attribute,
 // debug info should be corrected to the first outer macro instantiation
 // without collapse_debuginfo attribute.
-// collapse_debuginfo feature enabled.
 
 //@ compile-flags:-g
 
@@ -61,7 +59,7 @@ fn myprintln_impl(text: &str) {
     println!("{}", text)
 }
 
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
 macro_rules! myprintln {
     ($($arg:tt)*) => {{
         myprintln_impl($($arg)*);
diff --git a/tests/debuginfo/collapse-debuginfo-no-attr-flag.rs b/tests/debuginfo/collapse-debuginfo-no-attr-flag.rs
deleted file mode 100644
index fbc7d03e0df..00000000000
--- a/tests/debuginfo/collapse-debuginfo-no-attr-flag.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-//@ ignore-lldb
-#![feature(collapse_debuginfo)]
-
-// Test that line numbers are not replaced with those of the outermost expansion site when the
-// `collapse_debuginfo` is active, `-Zdebug-macros` is provided and `#[collapse_debuginfo]` not
-// being used.
-
-//@ compile-flags:-g -Zdebug-macros
-
-// === GDB TESTS ===================================================================================
-
-// gdb-command:run
-// gdb-command:next
-// gdb-command:frame
-// gdb-check:[...]#loc1[...]
-// gdb-command:next
-// gdb-command:frame
-// gdb-check:[...]#loc2[...]
-// gdb-command:next
-// gdb-command:frame
-// gdb-check:[...]#loc3[...]
-// gdb-command:next
-// gdb-command:frame
-// gdb-check:[...]#loc4[...]
-// gdb-command:continue
-
-fn one() {
-    println!("one");
-}
-fn two() {
-    println!("two");
-}
-fn three() {
-    println!("three");
-}
-fn four() {
-    println!("four");
-}
-
-macro_rules! outer {
-    ($b:block) => {
-        one(); // #loc1
-        inner!();
-        $b
-    };
-}
-
-macro_rules! inner {
-    () => {
-        two(); // #loc2
-    };
-}
-
-fn main() {
-    let ret = 0; // #break
-    outer!({
-        three(); // #loc3
-        four(); // #loc4
-    });
-    std::process::exit(ret);
-}
diff --git a/tests/debuginfo/collapse-debuginfo-no-attr.rs b/tests/debuginfo/collapse-debuginfo-no-attr.rs
index 4ea1b2cf7a4..6f0d041024f 100644
--- a/tests/debuginfo/collapse-debuginfo-no-attr.rs
+++ b/tests/debuginfo/collapse-debuginfo-no-attr.rs
@@ -1,10 +1,9 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
-// Test that line numbers are not replaced with those of the outermost expansion site when the
-// `collapse_debuginfo` feature is active and the attribute is not provided.
+// Test that line numbers are not replaced with those of the outermost expansion site when
+// `#[collapse_debuginfo]` attribute us not used.
 
-//@ compile-flags:-g -Z collapse_macro_debuginfo=no
+//@ compile-flags:-g
 
 // === GDB TESTS ===================================================================================
 
diff --git a/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs b/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs
index b585cdf13e0..8da084126ca 100644
--- a/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs
+++ b/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs
@@ -1,11 +1,9 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
-// Test that line numbers are not replaced with those of the outermost expansion site when the
-// `collapse_debuginfo` is active and `-Zdebug-macros` is provided, despite `#[collapse_debuginfo]`
-// being used.
+// Test that line numbers are not replaced with those of the outermost expansion site when
+// `-C collapse-macro-debuginfo=false` is passed, despite `#[collapse_debuginfo]` being used.
 
-//@ compile-flags:-g -Zdebug-macros
+//@ compile-flags:-g -C collapse-macro-debuginfo=false
 
 // === GDB TESTS ===================================================================================
 
@@ -37,7 +35,7 @@ fn four() {
     println!("four");
 }
 
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
 macro_rules! outer {
     ($b:block) => {
         one(); // #loc1
@@ -46,7 +44,7 @@ macro_rules! outer {
     };
 }
 
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
 macro_rules! inner {
     () => {
         two(); // #loc2
diff --git a/tests/debuginfo/collapse-debuginfo-with-attr.rs b/tests/debuginfo/collapse-debuginfo-with-attr.rs
index e7698c5f629..fa664687796 100644
--- a/tests/debuginfo/collapse-debuginfo-with-attr.rs
+++ b/tests/debuginfo/collapse-debuginfo-with-attr.rs
@@ -1,5 +1,4 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
 // Test that line numbers are replaced with those of the outermost expansion site when the
 // `collapse_debuginfo` feature is active and the attribute is provided.
@@ -33,7 +32,7 @@ fn four() {
     println!("four");
 }
 
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
 macro_rules! outer {
     ($b:block) => {
         one();
@@ -42,7 +41,7 @@ macro_rules! outer {
     };
 }
 
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
 macro_rules! inner {
     () => {
         two();
diff --git a/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs b/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs
index 2c3ecf3f5af..ef92f87ef46 100644
--- a/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs
+++ b/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs
@@ -1,10 +1,9 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
 // Test that line numbers are replaced with those of the outermost expansion site when the
-// `collapse_debuginfo` feature is active and the command line flag is provided.
+// the command line flag is passed.
 
-//@ compile-flags:-g -Z collapse_macro_debuginfo=yes
+//@ compile-flags:-g -C collapse_macro_debuginfo=yes
 
 // === GDB TESTS ===================================================================================
 
diff --git a/tests/debuginfo/lexical-scope-with-macro.rs b/tests/debuginfo/lexical-scope-with-macro.rs
index 76c923524fb..7ea3dc62e45 100644
--- a/tests/debuginfo/lexical-scope-with-macro.rs
+++ b/tests/debuginfo/lexical-scope-with-macro.rs
@@ -1,7 +1,7 @@
 //@ min-lldb-version: 310
 //@ ignore-lldb FIXME #48807
 
-//@ compile-flags:-g -Zdebug-macros
+//@ compile-flags:-g
 
 // === GDB TESTS ===================================================================================
 
diff --git a/tests/debuginfo/macro-stepping.rs b/tests/debuginfo/macro-stepping.rs
index 71ff9798079..5f8d8287168 100644
--- a/tests/debuginfo/macro-stepping.rs
+++ b/tests/debuginfo/macro-stepping.rs
@@ -87,6 +87,7 @@ extern crate macro_stepping; // exports new_scope!()
 // lldb-command:frame select
 // lldb-check:[...] #inc-loc3 [...]
 
+#[collapse_debuginfo(yes)]
 macro_rules! foo {
     () => {
         let a = 1; opaque(a);
@@ -95,6 +96,7 @@ macro_rules! foo {
     };
 }
 
+#[collapse_debuginfo(yes)]
 macro_rules! foo2 {
     () => {
         foo!();
diff --git a/tests/debuginfo/skip_second_statement.rs b/tests/debuginfo/skip_second_statement.rs
index e0f3325bcff..ba182de0385 100644
--- a/tests/debuginfo/skip_second_statement.rs
+++ b/tests/debuginfo/skip_second_statement.rs
@@ -2,9 +2,8 @@
 
 // Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo.
 // Performed step-over and step-into debug stepping through call statements.
-// collapse_debuginfo feature disabled.
 
-//@ compile-flags:-g
+//@ compile-flags:-g -C collapse-macro-debuginfo=yes
 
 // === GDB TESTS ===================================================================================
 
diff --git a/tests/debuginfo/skip_second_statement_collapse.rs b/tests/debuginfo/skip_second_statement_collapse.rs
index f1a74b629e4..db90cee8bfb 100644
--- a/tests/debuginfo/skip_second_statement_collapse.rs
+++ b/tests/debuginfo/skip_second_statement_collapse.rs
@@ -1,9 +1,7 @@
 //@ ignore-lldb
-#![feature(collapse_debuginfo)]
 
 // Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo
 // Performed step-over and step-into debug stepping through call statements.
-// collapse_debuginfo feature enabled.
 
 //@ compile-flags:-g
 
@@ -94,7 +92,7 @@ fn myprintln_impl(text: &str) {
     println!("{}", text)
 }
 
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
 macro_rules! myprintln {
     ($($arg:tt)*) => {{
         myprintln_impl($($arg)*);