Skip to content

Commit 8da518c

Browse files
committed
---
yaml --- r: 227320 b: refs/heads/auto c: c9a49f9 h: refs/heads/master v: v3
1 parent 2503756 commit 8da518c

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
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 9c3a8664b6c6ab0e5650166220f870c3a0c2b60b
11+
refs/heads/auto: c9a49f93ac8e9cdbaa22b33c9e3b9a9adffd360c
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/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)