Repository: rust
Issue: Corrupted variable view in the debugger on Windows
Labels: O-windows,A-debuginfo,T-compiler,C-bug

I am not sure if it belongs to this project. Please advise if it should be moved somewhere else.

I have got sample code from Hyper project (code sample is below), which I compiled using stable MSVC toolchain on Windows (stable-x86_64-pc-windows-msvc, rustc 1.21.0 (3b72af97e 2017-10-09)). Next I launched it under a debugger and played with breakpoints and variable inspections. I can see that the debugger shows correct view of local variables like `adr` and `strin` inside of `call` function.

![image](https://user-images.githubusercontent.com/3971413/32754511-d941b25e-c935-11e7-9b7d-e4f4ef5ae170.png)

However, the inspection of the `req` variable is corrupted:

![image](https://user-images.githubusercontent.com/3971413/32754546-fd966a78-c935-11e7-833b-d464edfac4b3.png)

I am observing the same with Visual Studio Code + cppvsdbg and with Visual Studio 2017 debugger.

I am not sure if the issue is inferred by incomplete debug information or incorrect visualization settings for the debugger.  I understand debugger visualization extensions (natvis) are embedded into PDB files now (?). Although, I have configured VS Code debugger visualization extensions (not sure if it was done correctly ?). Could you please advise what I should try / check to resolve the issue?

Debugger launch config in VS Code:
```json
     {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/target/debug/hello_cargo.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true
        }
```

Code sample used:
```rust
extern crate hyper;
extern crate futures;

use futures::future::Future;

use hyper::header::ContentLength;
use hyper::server::{Http, Request, Response, Service};

struct HelloWorld;

const PHRASE: &'static str = "Hello, World!";

impl HelloWorld {
    fn callee(&self, str: String) {

    }
}

impl Service for HelloWorld {
    // boilerplate hooking up hyper's server types
    type Request = Request;
    type Response = Response;
    type Error = hyper::Error;
    // The future representing the eventual Response your call will
    // resolve to. This can change to whatever Future you need.
    type Future = Box<Future<Item=Self::Response, Error=Self::Error>>;

    fn call(&self, req: Request) -> Self::Future {
        let strin = String::from("aaaaaaa");
        let adr = req.remote_addr().unwrap();
        println!("{}", adr);
        println!("{}", strin);
        self.callee(strin.clone());
        self.callee(strin);
        // We're currently ignoring the Request
        // And returning an 'ok' Future, which means it's ready
        // immediately, and build a Response with the 'PHRASE' body.
        Box::new(futures::future::ok(
            Response::new()
                .with_header(ContentLength(PHRASE.len() as u64))
                .with_body(PHRASE)
        ))
    }
}

fn main() {
    let addr = "127.0.0.1:3000".parse().unwrap();
    let server = Http::new().bind(&addr, || Ok(HelloWorld)).unwrap();
    server.run().unwrap();
}
```

 but I observed the same issue happening with VS Code + cppvsdbg extension and Visual Studio 2017 debuggers. I guess it is related to incomplete PDB infromation