Skip to content

Commit 25925f4

Browse files
committed
---
yaml --- r: 52117 b: refs/heads/dist-snap c: 1070cc0 h: refs/heads/master i: 52115: 493d8bc v: v3
1 parent 6cc07d9 commit 25925f4

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 6c18c75f2d1d9c491f288724d355c11d3788d123
10+
refs/heads/dist-snap: 1070cc0109661d9f47a6e2c39ad853041ddf30e2
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/middle/ty.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,11 +1606,18 @@ fn subst(cx: ctxt,
16061606
fold_regions_and_ty(
16071607
cx, typ,
16081608
|r| match r {
1609-
re_bound(br_self) => substs.self_r.expect(
1610-
fmt!("ty::subst: \
1611-
Reference to self region when given substs with no \
1612-
self region, ty = %s",
1613-
::util::ppaux::ty_to_str(cx, typ))),
1609+
re_bound(br_self) => {
1610+
match substs.self_r {
1611+
None => {
1612+
cx.sess.bug(
1613+
fmt!("ty::subst: \
1614+
Reference to self region when given substs \
1615+
with no self region, ty = %s",
1616+
::util::ppaux::ty_to_str(cx, typ)))
1617+
}
1618+
Some(self_r) => self_r
1619+
}
1620+
}
16141621
_ => r
16151622
},
16161623
|t| do_subst(cx, substs, t),

0 commit comments

Comments
 (0)