Skip to content

Commit e1ace87

Browse files
committed
---
yaml --- r: 233381 b: refs/heads/beta c: c9a49f9 h: refs/heads/master i: 233379: 13cc0aa v: v3
1 parent 267025c commit e1ace87

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 9c3a8664b6c6ab0e5650166220f870c3a0c2b60b
26+
refs/heads/beta: c9a49f93ac8e9cdbaa22b33c9e3b9a9adffd360c
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_typeck/check/regionck.rs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,47 +1562,6 @@ fn components_must_outlive<'a, 'tcx>(rcx: &Rcx<'a, 'tcx>,
15621562
}
15631563
}
15641564

1565-
/// Checks that all data reachable via `ty` *strictly* outlives `scope`.
1566-
/// This is used by dropck.
1567-
///
1568-
/// CAUTION: It is mostly but not entirely equivalent to `T:'parent`
1569-
/// where `'parent` is the parent of `scope`. The difference is subtle
1570-
/// and has to do with trait objects, primarily. In particular, if you
1571-
/// have `Foo<'y>+'z`, then we require that `'z:'parent` but not
1572-
/// `'y:'parent` (same with lifetimes appearing in fn arguments). This
1573-
/// is because there is no actual reference to the trait object that
1574-
/// outlives `scope`, so we don't need to require that the type could
1575-
/// be named outside `scope`. Because trait objects are always
1576-
/// considered "suspicious" by dropck, if we don't add this special
1577-
/// case, you wind up with some kind of annoying and odd limitations
1578-
/// that crop up
1579-
/// `src/test/compile-fail/regions-early-bound-trait-param.rs`.
1580-
/// Basically there we have `&'foo Trait<'foo>+'bar`, and thus forcing
1581-
/// `'foo` to outlive `'parent` also forces the borrow to outlive
1582-
/// `'parent`, which is longer than should be necessary. The existence
1583-
/// of this "the same but different" predicate is somewhat bothersome
1584-
/// and questionable.
1585-
pub fn type_strictly_outlives<'a, 'tcx>(rcx: &mut Rcx<'a, 'tcx>,
1586-
origin: infer::SubregionOrigin<'tcx>,
1587-
ty: Ty<'tcx>,
1588-
scope: CodeExtent)
1589-
{
1590-
debug!("type_strictly_outlives(ty={:?}, scope={:?})",
1591-
ty, scope);
1592-
1593-
let span = origin.span();
1594-
1595-
let parent_region =
1596-
match rcx.tcx().region_maps.opt_encl_scope(scope) {
1597-
Some(parent_scope) => ty::ReScope(parent_scope),
1598-
None => rcx.tcx().sess.span_bug(
1599-
span, &format!("no enclosing scope found for scope: {:?}",
1600-
scope)),
1601-
};
1602-
1603-
type_must_outlive(rcx, origin, ty, parent_region);
1604-
}
1605-
16061565
fn param_ty_must_outlive<'a, 'tcx>(rcx: &Rcx<'a, 'tcx>,
16071566
origin: infer::SubregionOrigin<'tcx>,
16081567
region: ty::Region,

0 commit comments

Comments
 (0)