about summary refs log tree commit diff
path: root/src/test/debuginfo
diff options
context:
space:
mode:
authorLuqman Aden <me@luqman.ca>2014-12-02 17:33:52 -0500
committerLuqman Aden <me@luqman.ca>2014-12-02 17:33:52 -0500
commit886ff4f3c3d05d4dda13390f045a6eb577f1e509 (patch)
tree57562f3caea6a66f8936d9f476b4705892ac160c /src/test/debuginfo
parent3a325c666d2cb7e297bf3057ff2442f96a79428b (diff)
downloadrust-886ff4f3c3d05d4dda13390f045a6eb577f1e509.tar.gz
rust-886ff4f3c3d05d4dda13390f045a6eb577f1e509.zip
lldb: Fix pretty printer for nullable-opt enums with fat pointers.
Diffstat (limited to 'src/test/debuginfo')
-rw-r--r--src/test/debuginfo/option-like-enum.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/debuginfo/option-like-enum.rs b/src/test/debuginfo/option-like-enum.rs
index 11c594bac59..333a430e351 100644
--- a/src/test/debuginfo/option-like-enum.rs
+++ b/src/test/debuginfo/option-like-enum.rs
@@ -61,6 +61,12 @@
 // lldb-command:print void_droid
 // lldb-check:[...]$5 = Void
 
+// lldb-command:print some_str
+// lldb-check:[...]$6 = Some(&str { data_ptr: [...], length: 3 })
+
+// lldb-command:print none_str
+// lldb-check:[...]$7 = None
+
 
 // If a struct has exactly two variants, one of them is empty, and the other one
 // contains a non-nullable pointer, then this value is used as the discriminator.
@@ -96,6 +102,9 @@ struct NamedFieldsRepr<'a> {
 
 fn main() {
 
+    let some_str: Option<&'static str> = Some("abc");
+    let none_str: Option<&'static str> = None;
+
     let some: Option<&u32> = Some(unsafe { std::mem::transmute(0x12345678u) });
     let none: Option<&u32> = None;