diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 67907bc8cbf..d0c9e0dbaf4 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -616,6 +616,7 @@ impl Step for DebuggerScripts {
cp_debugger_script("natvis/intrinsic.natvis");
cp_debugger_script("natvis/liballoc.natvis");
cp_debugger_script("natvis/libcore.natvis");
+ cp_debugger_script("natvis/libstd.natvis");
} else {
cp_debugger_script("debugger_pretty_printers_common.py");
diff --git a/src/etc/natvis/libstd.natvis b/src/etc/natvis/libstd.natvis
new file mode 100644
index 00000000000..b3fc3d17af7
--- /dev/null
+++ b/src/etc/natvis/libstd.natvis
@@ -0,0 +1,102 @@
+
+
+
+
+
+ {{ size={base.table.items} }}
+
+ - base.table.items
+ - base.table.items + base.table.growth_left
+
+
+
+
+ base.table.items
+
+
+
+
+ n--
+ - base.table.data.pointer[i].__1
+
+ i++
+
+
+
+
+
+
+ {{ size={map.base.table.items} }}
+
+ - map.base.table.items
+ - map.base.table.items + map.base.table.growth_left
+
+
+
+
+ map.base.table.items
+
+
+
+
+ n--
+ - map.base.table.data.pointer[i].__0
+
+ i++
+
+
+
+
+
+
+
+ {{ size={items} }}
+
+ - items
+ - items + growth_left
+
+
+
+
+ items
+
+
+
+
+ n--
+ - data.pointer[i]
+
+ i++
+
+
+
+
+
diff --git a/src/test/debuginfo/pretty-std-collections-hash.rs b/src/test/debuginfo/pretty-std-collections-hash.rs
new file mode 100644
index 00000000000..361b300f28c
--- /dev/null
+++ b/src/test/debuginfo/pretty-std-collections-hash.rs
@@ -0,0 +1,97 @@
+// cdb-only
+// compile-flags:-g
+
+// === CDB TESTS ==================================================================================
+
+// cdb-command: g
+
+// cdb-command: dx hash_set,d
+// cdb-check:hash_set,d [...] : { size=15 } [Type: [...]::HashSet]
+// cdb-check: [size] : 15 [Type: [...]]
+// cdb-check: [capacity] : [...]
+// cdb-check: [[...]] [...] : 0 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 1 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 2 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 3 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 4 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 5 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 6 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 7 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 8 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 9 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 10 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 11 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 12 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 13 [Type: unsigned __int64]
+// cdb-command: dx hash_set,d
+// cdb-check: [[...]] [...] : 14 [Type: unsigned __int64]
+
+// cdb-command: dx hash_map,d
+// cdb-check:hash_map,d [...] : { size=15 } [Type: [...]::HashMap]
+// cdb-check: [size] : 15 [Type: [...]]
+// cdb-check: [capacity] : [...]
+// cdb-check: ["0x0"] : 0 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x1"] : 1 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x2"] : 2 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x3"] : 3 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x4"] : 4 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x5"] : 5 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x6"] : 6 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x7"] : 7 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x8"] : 8 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0x9"] : 9 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0xa"] : 10 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0xb"] : 11 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0xc"] : 12 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0xd"] : 13 [Type: unsigned __int64]
+// cdb-command: dx hash_map,d
+// cdb-check: ["0xe"] : 14 [Type: unsigned __int64]
+
+#![allow(unused_variables)]
+use std::collections::HashSet;
+use std::collections::HashMap;
+
+
+fn main() {
+ // HashSet
+ let mut hash_set = HashSet::new();
+ for i in 0..15 {
+ hash_set.insert(i as u64);
+ }
+
+ // HashMap
+ let mut hash_map = HashMap::new();
+ for i in 0..15 {
+ hash_map.insert(i as u64, i as u64);
+ }
+
+ zzz(); // #break
+}
+
+fn zzz() { () }