rust/src/librustc_borrowck
bors 43c090ed69 Auto merge of #35732 - jonathandturner:region_error_labels, r=nikomatsakis
Move 'doesn't live long enough' errors to labels

This patch moves the "doesn't live long enough" region-style errors to instead use labels.

An example follows.

Before:

```
error: `x` does not live long enough
  --> src/test/compile-fail/send-is-not-static-ensures-scoping.rs:26:18
   |
26 |         let y = &x;
   |                  ^
   |
note: reference must be valid for the block at 23:10...
  --> src/test/compile-fail/send-is-not-static-ensures-scoping.rs:23:11
   |
23 | fn main() {
   |           ^
note: ...but borrowed value is only valid for the block suffix following statement 0 at 25:18
  --> src/test/compile-fail/send-is-not-static-ensures-scoping.rs:25:19
   |
25 |         let x = 1;
   |                   ^
```

After:

```
error: `x` does not live long enough
  --> src/test/compile-fail/send-is-not-static-ensures-scoping.rs:26:18
   |
26 |         let y = &x;
   |                  ^ does not live long enough
...
32 |     };
   |     - borrowed value only valid until here
...
35 | }
   | - borrowed value must be valid until here
```

r? @nikomatsakis
2016-08-18 05:39:11 -07:00
..
borrowck Auto merge of #35732 - jonathandturner:region_error_labels, r=nikomatsakis 2016-08-18 05:39:11 -07:00
bitslice.rs
Cargo.toml Fix Cargo.tomls 2016-06-27 18:30:46 +00:00
diagnostics.rs Update librustc_borrowck error codes check 2016-08-07 20:16:02 +02:00
graphviz.rs
indexed_set.rs introduce the type-safe IdxVec and use it instead of loose indexes 2016-06-09 14:26:08 +03:00
lib.rs Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00