You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/attributes/debugger.md
+6-9
Original file line number
Diff line number
Diff line change
@@ -142,21 +142,18 @@ When the crate's debug executable is passed into GDB[^rust-gdb], `print bob` wil
142
142
143
143
## The `collapse_debuginfo` attribute
144
144
145
-
The *`collapse_debuginfo`[attribute]* controls whether code locations from a macro definition are collapsed into a
146
-
single location associated with the macro's call site, when generating debuginfo for code calling
147
-
this macro.
145
+
The *`collapse_debuginfo`[attribute]* controls whether code locations from a macro definition are collapsed into a single location associated with the macro's call site,
146
+
when generating debuginfo for code calling this macro.
148
147
149
-
The attribute uses the [_MetaListIdents_] syntax to specify its inputs, and can only be applied to
150
-
macro definitions.
148
+
The attribute uses the [_MetaListIdents_] syntax to specify its inputs, and can only be applied to macro definitions.
151
149
152
150
Accepted options:
153
151
-`#[collapse_debuginfo(yes)]` — code locations in debuginfo are collapsed.
154
152
-`#[collapse_debuginfo(no)]` — code locations in debuginfo are not collapsed.
155
-
-`#[collapse_debuginfo(external)]` — code locations in debuginfo are collapsed only if the macro
156
-
comes from a different crate.
153
+
-`#[collapse_debuginfo(external)]` — code locations in debuginfo are collapsed only if the macro comes from a different crate.
157
154
158
-
The `external` behavior is the default for macros that don't have this attribute, unless they are
159
-
built-in macros. For built-in macros the default is `yes`.
155
+
The `external` behavior is the default for macros that don't have this attribute, unless they are built-in macros.
156
+
For built-in macros the default is `yes`.
160
157
161
158
> **Note**: `rustc` has a `-C collapse-macro-debuginfo` CLI option to override both the default collapsing behavior and `#[collapse_debuginfo]` attributes.
0 commit comments