about summary refs log tree commit diff
path: root/src/librustc_borrowck
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-06-07 00:04:53 -0700
committerbors <bors@rust-lang.org>2016-06-07 00:04:53 -0700
commitf35255038bacaf2dd3c8a1188657f76c8f974375 (patch)
tree37cf8df731c7782ee686f958081a68e03146f87c /src/librustc_borrowck
parent763f9234b052c7911dc4cf952a81a85c51c57784 (diff)
parentbcec7a58485c82e69a58a8ee849a05fd8f42d5af (diff)
downloadrust-f35255038bacaf2dd3c8a1188657f76c8f974375.tar.gz
rust-f35255038bacaf2dd3c8a1188657f76c8f974375.zip
Auto merge of #34012 - eddyb:tick-erased, r=nikomatsakis
rustc: add ReErased to be used by trait selection, MIR and trans.

`ReErased` replaces `ReStatic` (i.e. `'static`) for erasing regions.
Using a distinct lifetime helps prevent accidental mix-ups between the two.
It also allows cleaner type printing (see test changes), including in symbol names:
```rust
str..pattern..CharSearcher$LT$$u27$static$GT$::drop.30560::h840c2f2afc03bbea // before
str..pattern..CharSearcher::drop.30561::h6bd31d2af614377a // after
```
Not that we should be producing symbols this way, but it's still better.
Diffstat (limited to 'src/librustc_borrowck')
-rw-r--r--src/librustc_borrowck/borrowck/gather_loans/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_borrowck/borrowck/gather_loans/mod.rs b/src/librustc_borrowck/borrowck/gather_loans/mod.rs
index 7d4f02bfe11..7f814f5dfaa 100644
--- a/src/librustc_borrowck/borrowck/gather_loans/mod.rs
+++ b/src/librustc_borrowck/borrowck/gather_loans/mod.rs
@@ -369,7 +369,8 @@ impl<'a, 'tcx> GatherLoanCtxt<'a, 'tcx> {
                     ty::ReLateBound(..) |
                     ty::ReEarlyBound(..) |
                     ty::ReVar(..) |
-                    ty::ReSkolemized(..) => {
+                    ty::ReSkolemized(..) |
+                    ty::ReErased => {
                         span_bug!(
                             cmt.span,
                             "invalid borrow lifetime: {:?}",