Skip to content

Commit d132ef5

Browse files
committed
---
yaml --- r: 233391 b: refs/heads/beta c: ad700ab h: refs/heads/master i: 233389: 0d96d4c 233387: 524562e 233383: 94e54b8 233375: 754b5b5 v: v3
1 parent cd88467 commit d132ef5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
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: fda9b8396057426e86409fd75c69d896b05c372e
26+
refs/heads/beta: ad700abea4c6718628a4ceccccdad6a633f1dd9c
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/middle/ty.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6233,13 +6233,18 @@ impl<'tcx> ctxt<'tcx> {
62336233
/// themselves. This should really be a unique type; `FreshTy(0)` is a
62346234
/// popular choice.
62356235
///
6236+
/// NB: in some cases, particularly around higher-ranked bounds,
6237+
/// this function returns a kind of conservative approximation.
6238+
/// That is, all regions returned by this function are definitely
6239+
/// required, but there may be other region bounds that are not
6240+
/// returned, as well as requirements like `for<'a> T: 'a`.
6241+
///
62366242
/// Requires that trait definitions have been processed so that we can
62376243
/// elaborate predicates and walk supertraits.
62386244
pub fn required_region_bounds(&self,
62396245
erased_self_ty: Ty<'tcx>,
62406246
predicates: Vec<ty::Predicate<'tcx>>)
6241-
-> Vec<ty::Region>
6242-
{
6247+
-> Vec<ty::Region> {
62436248
debug!("required_region_bounds(erased_self_ty={:?}, predicates={:?})",
62446249
erased_self_ty,
62456250
predicates);
@@ -6268,11 +6273,7 @@ impl<'tcx> ctxt<'tcx> {
62686273
// construct such an object, but this seems
62696274
// correct even if that code changes).
62706275
if t == erased_self_ty && !r.has_escaping_regions() {
6271-
if r.has_escaping_regions() {
6272-
Some(ty::ReStatic)
6273-
} else {
6274-
Some(r)
6275-
}
6276+
Some(r)
62766277
} else {
62776278
None
62786279
}

0 commit comments

Comments
 (0)