rust/src
bors 6f815ca771 Auto merge of #43221 - MaulingMonkey:natvis-improvements, r=michaelwoerister
Embed MSVC .natvis files into .pdbs and mangle debuginfo for &str, *T, and [T].

No idea if these changes are reasonable - please feel free to suggest changes/rewrites.  And these are some of my first real commits to any rust codebase - *don't* be gentle, and nitpick away, I need to learn! ;)

### Overview
Embedding `.natvis` files into `.pdb`s allows MSVC (and potentially other debuggers) to automatically pick up the visualizers without having to do any additional configuration (other than to perhaps add the relevant .pdb paths to symbol search paths.)

The native debug engine for MSVC parses the type names, making various C++ish assumptions about what they mean and adding various limitations to valid type names.  `&str` cannot be matched against a visualizer, but if we emit `str&` instead, it'll be recognized as a reference to a `str`, solving the problem.  `[T]` is similarly problematic, but emitting `slice<T>` instead works fine as it looks like a template.  I've been unable to get e.g. `slice<u32>&` to match visualizers in VS2015u3, so I've gone with `str*` and `slice<u32>*` instead.

### Possible Issues
* I'm not sure if `slice<T>` is a great mangling for `[T]` or if I should worry about name collisions.
* I'm not sure if `linker.rs` is the right place to be enumerating natvis files.
* I'm not sure if these type name mangling changes should actually be MSVC specific.  I recall seeing gdb visualizer tests that might be broken if made more general?  I'm hesitant to mess with them without a gdb install.  But perhaps I'm just wracking up technical debt.
  Should I try `pacman -S mingw-w64-x86_64-gdb` and to make things consistent?
* I haven't touched `const` / `mut` yet, and I'm worried MSVC might trip up on `mut` or their placement.
* I may like terse oneliners too much.
* I don't know if there's broader implications for messing with debug type names here.
* I may have been mistaken about bellow test failures being ignorable / unrelated to this changelist.

### Test Failures on `x86_64-pc-windows-gnu`

```
---- [debuginfo-gdb] debuginfo-gdb\associated-types.rs stdout ----
        thread '[debuginfo-gdb] debuginfo-gdb\associated-types.rs' panicked at 'gdb not available but debuginfo gdb debuginfo test requested', src\tools\compiletest\src\runtest.rs:48:16
note: Run with `RUST_BACKTRACE=1` for a backtrace.

[...identical panic causes omitted...]

---- [debuginfo-gdb] debuginfo-gdb\vec.rs stdout ----
        thread '[debuginfo-gdb] debuginfo-gdb\vec.rs' panicked at 'gdb not available but debuginfo gdb debuginfo test requested', src\tools\compiletest\src\runtest.rs:48:16
```

### Relevant Issues
* https://github.com/rust-lang/rust/issues/40460 Metaissue for Visual Studio debugging Rust
* https://github.com/rust-lang/rust/issues/36503 Investigate natvis for improved msvc debugging
* https://github.com/PistonDevelopers/VisualRust/issues/160 Debug visualization of Rust data structures

### Pretty Pictures
![Collapsed Watch Window](https://user-images.githubusercontent.com/75894/28180998-e44c7516-67bb-11e7-8b48-d4f9605973ae.png)
![Expanded Watch Window](https://user-images.githubusercontent.com/75894/28181000-e8da252e-67bb-11e7-96b8-d613310c04dc.png)
2017-07-28 10:25:58 +00:00
..
bootstrap Correct a few run.host invocations where run.target is intended. 2017-07-27 09:58:03 -06:00
build_helper Switch to rust-lang-nursery/compiler-builtins 2017-07-05 07:08:36 -07:00
ci Auto merge of #42059 - derekdreery:bugfix/fix_emscripten_tests, r=alexcrichton 2017-07-26 18:27:19 +00:00
doc Auto merge of #43373 - alexcrichton:stabilize-1.20.0, r=aturon 2017-07-26 23:40:48 +00:00
etc Auto merge of #43221 - MaulingMonkey:natvis-improvements, r=michaelwoerister 2017-07-28 10:25:58 +00:00
grammar changed upper bound digit in octal rule to 7 2017-06-13 17:08:12 -03:00
jemalloc@11bfb0dcf8 Revert "Update jemalloc to 4.5.0" 2017-06-09 20:23:38 +02:00
liballoc Auto merge of #43217 - pnkfelix:alloc-requires-align-it-in-u32, r=alexcrichton 2017-07-28 00:49:39 +00:00
liballoc_jemalloc Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
liballoc_system Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
libarena Bump version and stage0 compiler 2017-06-19 22:25:05 -07:00
libbacktrace
libcollections rustc: Implement the #[global_allocator] attribute 2017-07-05 14:37:01 -07:00
libcompiler_builtins@5e49856003 Update compiler_builtins submodule for probestack fix 2017-07-07 21:11:35 -07:00
libcore Use rustc_on_unimplemented's trait name argument in try 2017-07-27 19:18:22 -07:00
libfmt_macros Bump version and stage0 compiler 2017-06-19 22:25:05 -07:00
libgetopts Switch to the crates.io getopts crate 2017-06-20 12:43:12 -07:00
libgraphviz Removed as many "```ignore" as possible. 2017-06-23 15:31:53 +08:00
liblibc@ec1e5ab1ef Update liblibc 2017-07-18 19:01:51 -06:00
libpanic_abort
libpanic_unwind std: Avoid panics in rust_eh_personality 2017-06-08 07:06:43 -07:00
libproc_macro Add #[derive(Clone)] to TokenTreeIter 2017-07-17 20:34:13 +12:00
libprofiler_builtins Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librand Delete deprecated & unstable range-specific step_by 2017-07-01 19:18:02 -07:00
librustc Auto merge of #43505 - eddyb:poly-const-eval-layout-of, r=nikomatsakis 2017-07-28 08:01:02 +00:00
librustc_allocator rustc: Implement the #[global_allocator] attribute 2017-07-05 14:37:01 -07:00
librustc_asan Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_back rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
librustc_bitflags Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_borrowck Auto merge of #43479 - ivanbakel:loop_borrow_msg, r=estebank 2017-07-27 07:54:15 +00:00
librustc_const_eval rustc_const_eval: keep track of the appropriate ParamEnv. 2017-07-27 20:59:40 +03:00
librustc_const_math Bump version and stage0 compiler 2017-06-19 22:25:05 -07:00
librustc_data_structures Auto merge of #43373 - alexcrichton:stabilize-1.20.0, r=aturon 2017-07-26 23:40:48 +00:00
librustc_driver Rollup merge of #43421 - alexcrichton:add-some-build-scripts, r=Mark-Simulacrum 2017-07-24 09:16:37 -06:00
librustc_errors Auto merge of #43096 - estebank:ascription-help, r=nikomatsakis 2017-07-23 20:56:20 +00:00
librustc_incremental rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
librustc_lint rustc_const_eval: keep track of the appropriate ParamEnv. 2017-07-27 20:59:40 +03:00
librustc_llvm Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_lsan Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_metadata Rollup merge of #43421 - alexcrichton:add-some-build-scripts, r=Mark-Simulacrum 2017-07-24 09:16:37 -06:00
librustc_mir Auto merge of #43505 - eddyb:poly-const-eval-layout-of, r=nikomatsakis 2017-07-28 08:01:02 +00:00
librustc_msan Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
librustc_passes Auto merge of #43505 - eddyb:poly-const-eval-layout-of, r=nikomatsakis 2017-07-28 08:01:02 +00:00
librustc_platform_intrinsics Add support for PowerPC Altivec/VSX intrinsics 2017-07-24 09:08:20 +00:00
librustc_plugin Removed as many "```ignore" as possible. 2017-06-23 15:31:53 +08:00
librustc_privacy Downgrade ProjectionTy's TraitRef to its substs 2017-07-11 10:33:09 -04:00
librustc_resolve Avoid duplicated errors for generic arguments in macro paths 2017-07-27 23:01:17 +03:00
librustc_save_analysis Catch a panic in save-analysis 2017-07-24 17:25:16 +12:00
librustc_trans Auto merge of #43221 - MaulingMonkey:natvis-improvements, r=michaelwoerister 2017-07-28 10:25:58 +00:00
librustc_tsan rustc_{a,l,m,t}san: re-run build script if env var LLVM_CONFIG changes 2017-06-30 17:35:00 +00:00
librustc_typeck Auto merge of #43505 - eddyb:poly-const-eval-layout-of, r=nikomatsakis 2017-07-28 08:01:02 +00:00
librustdoc Auto merge of #43482 - Mark-Simulacrum:single-rustdoc, r=alexcrichton 2017-07-27 17:07:58 +00:00
libserialize Fix some doc/comment typos. 2017-07-23 22:48:01 +07:00
libstd Auto merge of #43477 - est31:master, r=alexcrichton 2017-07-27 04:25:37 +00:00
libstd_unicode std: Stabilize char_escape_debug 2017-07-25 07:09:31 -07:00
libsyntax Auto merge of #43432 - pczarn:macro-parser-description, r=jseyfried 2017-07-28 03:16:14 +00:00
libsyntax_ext Stabilize the compile_error_macro feature 2017-07-25 07:09:31 -07:00
libsyntax_pos Give span to angle bracketed generic arguments 2017-07-27 22:59:35 +03:00
libterm Fix checking for missing stability annotations 2017-07-16 23:15:07 +03:00
libtest Reduce the usage of features in compiletest and libtest 2017-07-13 16:37:57 +02:00
libunwind Haiku: fix initial platform support 2017-04-22 13:47:36 +12:00
llvm@d9e7d2696e Fix LLVM assertion when a weak symbol is defined in global_asm. 2017-07-18 16:52:00 +03:00
rt Remove the in-tree flate crate 2017-06-20 07:11:29 -07:00
rtstartup Update stage0 bootstrap compiler 2017-04-29 12:11:14 -07:00
rustc Build rustdoc on-demand. 2017-07-27 05:51:22 -06:00
rustllvm Auto merge of #43387 - TimNN:rustllvm50, r=alexcrichton 2017-07-23 01:57:37 +00:00
test Auto merge of #43505 - eddyb:poly-const-eval-layout-of, r=nikomatsakis 2017-07-28 08:01:02 +00:00
tools Don't needlessly build rustdoc for compiletest. 2017-07-27 05:51:22 -06:00
Cargo.lock Build rustdoc on-demand. 2017-07-27 05:51:22 -06:00
Cargo.toml Build rustdoc on-demand. 2017-07-27 05:51:22 -06:00
stage0.txt Bump master to 1.21.0 2017-07-25 07:03:19 -07:00