about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-08-18 05:39:11 -0700
committerGitHub <noreply@github.com>2016-08-18 05:39:11 -0700
commit43c090ed69a624928c03ad61a29a59badf80ff7b (patch)
tree23a269ce2a994db3f06e173b465b231e94e0bf38 /src/libstd/sys/unix/stack_overflow.rs
parent9d6520f97ba9062e6a6103f4038357e928d2f851 (diff)
parent864b3efd3302c9447f4d689779efda4a7b52c294 (diff)
downloadrust-43c090ed69a624928c03ad61a29a59badf80ff7b.tar.gz
rust-43c090ed69a624928c03ad61a29a59badf80ff7b.zip
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
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions