Skip to content

Commit f6d2843

Browse files
committed
Respond to review feedback
1 parent 9b5fe6e commit f6d2843

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
15451545
// {name} discriminant;
15461546
// }
15471547
// ```
1548-
// The natvis in `intrinsic.nativs` then matches on `this.discriminant` to
1548+
// The natvis in `intrinsic.natvis` then matches on `this.discriminant` to
15491549
// determine which variant is active and then displays it.
15501550
let enum_layout = self.layout;
15511551
let offset = enum_layout.fields.offset(tag_field);

src/test/debuginfo/msvc-pretty-enums.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
// only-cdb
2+
// ignore-tidy-linelength
23
// compile-flags:-g
34

45
// cdb-command: g
56

67
// Note: The natvis used to visualize niche-layout enums don't work correctly in cdb
7-
// so the best we can do is to make sure we are generating the right debuginfo
8+
// so the best we can do is to make sure we are generating the right debuginfo.
9+
// Therefore, we use the `!` [format specifier](https://docs.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp?view=vs-2019#BKMK_Visual_Studio_2012_format_specifiers)
10+
// to disable the natvis for a given expression. We also provide the `-r2` flag
11+
// to expand the expression 2 levels.
812

913
// cdb-command: dx -r2 a,!
1014
// cdb-check:a,! [Type: enum$<core::option::Option<enum$<msvc_pretty_enums::CStyleEnum> >, 2, 16, Some>]

0 commit comments

Comments
 (0)