summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-26 02:13:08 +0000
committerbors <bors@rust-lang.org>2024-04-26 02:13:08 +0000
commit6acb9e75ebc936df737381a9d0b7a7bccd6f0b2f (patch)
treedb0b8eabc2d2b5f6ece74237f604ec086dff7c69 /tests
parente59f2c544a0b0319c5e576e5b010afffa1b5c861 (diff)
parent683ad6b607852ec765ac964bf0e9fab9c85add1b (diff)
Auto merge of #120845 - petrochenkov:debmac, r=oli-obk
debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and `#[collapse_debuginfo]` `-Z debug-macros` is "stabilized" by enabling it by default and removing. `-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`. It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no. Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local) - https://github.com/rust-lang/rust/issues/100758#issuecomment-1935815625 describes some debugging scenarios that motivate this default as reasonable. `#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default. Stabilization report: https://github.com/rust-lang/rust/pull/120845#issuecomment-1939145242 Closes https://github.com/rust-lang/rust/issues/100758 Closes https://github.com/rust-lang/rust/issues/41743 Closes https://github.com/rust-lang/rust/issues/39153
Diffstat (limited to 'tests')
-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
-rw-r--r--tests/ui/attributes/collapse-debuginfo-invalid.rs47
-rw-r--r--tests/ui/attributes/collapse-debuginfo-invalid.stderr144
-rw-r--r--tests/ui/debuginfo/backtrace-dylib-dep.rs1
-rw-r--r--tests/ui/feature-gates/feature-gate-collapse_debuginfo.rs7
-rw-r--r--tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr13
18 files changed, 116 insertions, 208 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)*);
diff --git a/tests/ui/attributes/collapse-debuginfo-invalid.rs b/tests/ui/attributes/collapse-debuginfo-invalid.rs
index 42d8982c118..d6b3554a5a8 100644
--- a/tests/ui/attributes/collapse-debuginfo-invalid.rs
+++ b/tests/ui/attributes/collapse-debuginfo-invalid.rs
@@ -1,84 +1,83 @@
-#![feature(collapse_debuginfo)]
#![feature(stmt_expr_attributes)]
#![feature(type_alias_impl_trait)]
#![no_std]
// Test that the `#[collapse_debuginfo]` attribute can only be used on macro definitions.
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
extern crate std;
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
use std::collections::HashMap;
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
static FOO: u32 = 3;
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
const BAR: u32 = 3;
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
fn foo() {
- let _ = #[collapse_debuginfo] || { };
+ let _ = #[collapse_debuginfo(yes)] || { };
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
- #[collapse_debuginfo]
+ #[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
let _ = 3;
- let _ = #[collapse_debuginfo] 3;
+ let _ = #[collapse_debuginfo(yes)] 3;
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
match (3, 4) {
- #[collapse_debuginfo]
+ #[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
_ => (),
}
}
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
mod bar {
}
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
type Map = HashMap<u32, u32>;
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
enum Foo {
- #[collapse_debuginfo]
+ #[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
Variant,
}
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
struct Bar {
- #[collapse_debuginfo]
+ #[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
field: u32,
}
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
union Qux {
a: u32,
b: u16
}
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
trait Foobar {
- #[collapse_debuginfo]
+ #[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
type Bar;
}
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
type AFoobar = impl Foobar;
@@ -90,19 +89,19 @@ fn constraining() -> AFoobar {
Bar { field: 3 }
}
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
impl Bar {
- #[collapse_debuginfo]
+ #[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
const FOO: u32 = 3;
- #[collapse_debuginfo]
+ #[collapse_debuginfo(yes)]
//~^ ERROR `collapse_debuginfo` attribute should be applied to macro definitions
fn bar(&self) {}
}
-#[collapse_debuginfo]
+#[collapse_debuginfo(yes)]
macro_rules! finally {
($e:expr) => { $e }
}
diff --git a/tests/ui/attributes/collapse-debuginfo-invalid.stderr b/tests/ui/attributes/collapse-debuginfo-invalid.stderr
index 01c47609108..7cbbd1d647e 100644
--- a/tests/ui/attributes/collapse-debuginfo-invalid.stderr
+++ b/tests/ui/attributes/collapse-debuginfo-invalid.stderr
@@ -1,152 +1,152 @@
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:8:1
+ --> $DIR/collapse-debuginfo-invalid.rs:7:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | extern crate std;
| ----------------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:12:1
+ --> $DIR/collapse-debuginfo-invalid.rs:11:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | use std::collections::HashMap;
| ------------------------------ not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:16:1
+ --> $DIR/collapse-debuginfo-invalid.rs:15:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | static FOO: u32 = 3;
| -------------------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:20:1
+ --> $DIR/collapse-debuginfo-invalid.rs:19:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | const BAR: u32 = 3;
| ------------------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:24:1
+ --> $DIR/collapse-debuginfo-invalid.rs:23:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / fn foo() {
-LL | | let _ = #[collapse_debuginfo] || { };
+LL | | let _ = #[collapse_debuginfo(yes)] || { };
LL | |
-LL | | #[collapse_debuginfo]
+LL | | #[collapse_debuginfo(yes)]
... |
LL | | }
LL | | }
| |_- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:27:13
+ --> $DIR/collapse-debuginfo-invalid.rs:26:13
|
-LL | let _ = #[collapse_debuginfo] || { };
- | ^^^^^^^^^^^^^^^^^^^^^ ------ not a macro definition
+LL | let _ = #[collapse_debuginfo(yes)] || { };
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ------ not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:29:5
+ --> $DIR/collapse-debuginfo-invalid.rs:28:5
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | let _ = 3;
| ---------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:32:13
+ --> $DIR/collapse-debuginfo-invalid.rs:31:13
|
-LL | let _ = #[collapse_debuginfo] 3;
- | ^^^^^^^^^^^^^^^^^^^^^ - not a macro definition
+LL | let _ = #[collapse_debuginfo(yes)] 3;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:35:9
+ --> $DIR/collapse-debuginfo-invalid.rs:34:9
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | _ => (),
| ------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:41:1
+ --> $DIR/collapse-debuginfo-invalid.rs:40:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / mod bar {
LL | | }
| |_- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:46:1
+ --> $DIR/collapse-debuginfo-invalid.rs:45:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | type Map = HashMap<u32, u32>;
| ----------------------------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:50:1
+ --> $DIR/collapse-debuginfo-invalid.rs:49:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / enum Foo {
-LL | | #[collapse_debuginfo]
+LL | | #[collapse_debuginfo(yes)]
LL | |
LL | | Variant,
LL | | }
| |_- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:53:5
+ --> $DIR/collapse-debuginfo-invalid.rs:52:5
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | Variant,
| ------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:58:1
+ --> $DIR/collapse-debuginfo-invalid.rs:57:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / struct Bar {
-LL | | #[collapse_debuginfo]
+LL | | #[collapse_debuginfo(yes)]
LL | |
LL | | field: u32,
LL | | }
| |_- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:61:5
+ --> $DIR/collapse-debuginfo-invalid.rs:60:5
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | field: u32,
| ---------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:66:1
+ --> $DIR/collapse-debuginfo-invalid.rs:65:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / union Qux {
LL | | a: u32,
@@ -155,35 +155,35 @@ LL | | }
| |_- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:73:1
+ --> $DIR/collapse-debuginfo-invalid.rs:72:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / trait Foobar {
-LL | | #[collapse_debuginfo]
+LL | | #[collapse_debuginfo(yes)]
LL | |
LL | | type Bar;
LL | | }
| |_- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:81:1
+ --> $DIR/collapse-debuginfo-invalid.rs:80:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | type AFoobar = impl Foobar;
| --------------------------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:93:1
+ --> $DIR/collapse-debuginfo-invalid.rs:92:1
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / impl Bar {
-LL | | #[collapse_debuginfo]
+LL | | #[collapse_debuginfo(yes)]
LL | |
LL | | const FOO: u32 = 3;
... |
@@ -192,28 +192,28 @@ LL | | }
| |_- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:76:5
+ --> $DIR/collapse-debuginfo-invalid.rs:75:5
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | type Bar;
| --------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:96:5
+ --> $DIR/collapse-debuginfo-invalid.rs:95:5
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | const FOO: u32 = 3;
| ------------------- not a macro definition
error: `collapse_debuginfo` attribute should be applied to macro definitions
- --> $DIR/collapse-debuginfo-invalid.rs:100:5
+ --> $DIR/collapse-debuginfo-invalid.rs:99:5
|
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
+LL | #[collapse_debuginfo(yes)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | fn bar(&self) {}
| ---------------- not a macro definition
diff --git a/tests/ui/debuginfo/backtrace-dylib-dep.rs b/tests/ui/debuginfo/backtrace-dylib-dep.rs
index e2414073ede..fcd1f92e28e 100644
--- a/tests/ui/debuginfo/backtrace-dylib-dep.rs
+++ b/tests/ui/debuginfo/backtrace-dylib-dep.rs
@@ -27,6 +27,7 @@ macro_rules! pos {
};
}
+#[collapse_debuginfo(yes)]
macro_rules! check {
($($pos:expr),*) => ({
verify(&[$($pos,)* pos!()]);
diff --git a/tests/ui/feature-gates/feature-gate-collapse_debuginfo.rs b/tests/ui/feature-gates/feature-gate-collapse_debuginfo.rs
deleted file mode 100644
index f73bf579f6d..00000000000
--- a/tests/ui/feature-gates/feature-gate-collapse_debuginfo.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#[collapse_debuginfo]
-//~^ ERROR the `#[collapse_debuginfo]` attribute is an experimental feature
-macro_rules! foo {
- ($e:expr) => { $e }
-}
-
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr b/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr
deleted file mode 100644
index f361a76b4a7..00000000000
--- a/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0658]: the `#[collapse_debuginfo]` attribute is an experimental feature
- --> $DIR/feature-gate-collapse_debuginfo.rs:1:1
- |
-LL | #[collapse_debuginfo]
- | ^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #100758 <https://github.com/rust-lang/rust/issues/100758> for more information
- = help: add `#![feature(collapse_debuginfo)]` to the crate attributes to enable
- = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0658`.