diff options
| author | Markus Reiter <me@reitermark.us> | 2024-03-09 16:38:50 +0100 |
|---|---|---|
| committer | Markus Reiter <me@reitermark.us> | 2024-03-14 17:34:58 +0100 |
| commit | ecee730c45cdc7a582734d6440acba08a1214f82 (patch) | |
| tree | e0f9e2063bfdcfa9e47736c64955c7e3c8032500 | |
| parent | 40f8227d6df463a6af592d631efb260d19924474 (diff) | |
| download | rust-ecee730c45cdc7a582734d6440acba08a1214f82.tar.gz rust-ecee730c45cdc7a582734d6440acba08a1214f82.zip | |
Try fixing `debuginfo` test.
| -rw-r--r-- | src/etc/lldb_commands | 2 | ||||
| -rw-r--r-- | src/etc/natvis/libcore.natvis | 5 | ||||
| -rw-r--r-- | src/etc/rust_types.py | 2 | ||||
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 2 | ||||
| -rw-r--r-- | tests/debuginfo/numeric-types.rs | 24 |
5 files changed, 19 insertions, 16 deletions
diff --git a/src/etc/lldb_commands b/src/etc/lldb_commands index ed66ecf3072..5304f2ca34a 100644 --- a/src/etc/lldb_commands +++ b/src/etc/lldb_commands @@ -15,5 +15,5 @@ type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)C type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)Ref<.+>$" --category Rust type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefMut<.+>$" --category Rust type summary add -F lldb_lookup.summary_lookup -e -x -h "^(core::([a-z_]+::)+)RefCell<.+>$" --category Rust -type summary add -F lldb_lookup.summary_lookup -e -x -h "^core::num::([a-z_]+::)*NonZero.+$" --category Rust +type summary add -F lldb_lookup.summary_lookup -e -x -h "^core::num::([a-z_]+::)*NonZero<.+>$" --category Rust type category enable Rust diff --git a/src/etc/natvis/libcore.natvis b/src/etc/natvis/libcore.natvis index 5e0c21a13a9..8a441cf2093 100644 --- a/src/etc/natvis/libcore.natvis +++ b/src/etc/natvis/libcore.natvis @@ -42,7 +42,10 @@ </Type> <Type Name="core::num::nonzero::NonZero<*>"> - <DisplayString>{__0}</DisplayString> + <DisplayString>{__0.__0}</DisplayString> + <Expand> + <ExpandedItem>__0.__0</ExpandedItem> + </Expand> </Type> <Type Name="core::num::wrapping::Wrapping<*>"> diff --git a/src/etc/rust_types.py b/src/etc/rust_types.py index bf512bc99b8..3b2d2f9e983 100644 --- a/src/etc/rust_types.py +++ b/src/etc/rust_types.py @@ -50,7 +50,7 @@ STD_CELL_REGEX = re.compile(r"^(core::(\w+::)+)Cell<.+>$") STD_REF_REGEX = re.compile(r"^(core::(\w+::)+)Ref<.+>$") STD_REF_MUT_REGEX = re.compile(r"^(core::(\w+::)+)RefMut<.+>$") STD_REF_CELL_REGEX = re.compile(r"^(core::(\w+::)+)RefCell<.+>$") -STD_NONZERO_NUMBER_REGEX = re.compile(r"^core::num::([a-z_]+::)*NonZero.+$") +STD_NONZERO_NUMBER_REGEX = re.compile(r"^core::num::([a-z_]+::)*NonZero<.+>$") TUPLE_ITEM_REGEX = re.compile(r"__\d+$") diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index ae0db88d873..1e1c5fb20d4 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1495,7 +1495,7 @@ impl<'test> TestCx<'test> { "^(core::([a-z_]+::)+)Ref<.+>$", "^(core::([a-z_]+::)+)RefMut<.+>$", "^(core::([a-z_]+::)+)RefCell<.+>$", - "^core::num::([a-z_]+::)*NonZero.+$", + "^core::num::([a-z_]+::)*NonZero<.+>$", ]; // In newer versions of lldb, persistent results (the `$N =` part at the start of diff --git a/tests/debuginfo/numeric-types.rs b/tests/debuginfo/numeric-types.rs index 74c9e5e1dc3..9ea770652b1 100644 --- a/tests/debuginfo/numeric-types.rs +++ b/tests/debuginfo/numeric-types.rs @@ -203,40 +203,40 @@ // lldb-command:run // lldb-command:print/d nz_i8 -// lldb-check:[...]$0 = 11 { __0 = 11 } +// lldb-check:[...]$0 = None { __0 = { 0 = 11 } } // lldb-command:print nz_i16 -// lldb-check:[...]$1 = 22 { __0 = 22 } +// lldb-check:[...]$1 = None { __0 = { 0 = 22 } } // lldb-command:print nz_i32 -// lldb-check:[...]$2 = 33 { __0 = 33 } +// lldb-check:[...]$2 = None { __0 = { 0 = 33 } } // lldb-command:print nz_i64 -// lldb-check:[...]$3 = 44 { __0 = 44 } +// lldb-check:[...]$3 = None { __0 = { 0 = 44 } } // lldb-command:print nz_i128 -// lldb-check:[...]$4 = 55 { __0 = 55 } +// lldb-check:[...]$4 = None { __0 = { 0 = 55 } } // lldb-command:print nz_isize -// lldb-check:[...]$5 = 66 { __0 = 66 } +// lldb-check:[...]$5 = None { __0 = { 0 = 66 } } // lldb-command:print/d nz_u8 -// lldb-check:[...]$6 = 77 { __0 = 77 } +// lldb-check:[...]$6 = None { __0 = { 0 = 77 } } // lldb-command:print nz_u16 -// lldb-check:[...]$7 = 88 { __0 = 88 } +// lldb-check:[...]$7 = None { __0 = { 0 = 88 } } // lldb-command:print nz_u32 -// lldb-check:[...]$8 = 99 { __0 = 99 } +// lldb-check:[...]$8 = None { __0 = { 0 = 99 } } // lldb-command:print nz_u64 -// lldb-check:[...]$9 = 100 { __0 = 100 } +// lldb-check:[...]$9 = None { __0 = { 0 = 100 } } // lldb-command:print nz_u128 -// lldb-check:[...]$10 = 111 { __0 = 111 } +// lldb-check:[...]$10 = None { __0 = { 0 = 111 } } // lldb-command:print nz_usize -// lldb-check:[...]$11 = 122 { __0 = 122 } +// lldb-check:[...]$11 = None { __0 = { 0 = 122 } } #![feature(generic_nonzero)] use std::num::*; |
