Skip to content

Commit cfc64dd

Browse files
committed
---
yaml --- r: 150995 b: refs/heads/try2 c: 45c8cb3 h: refs/heads/master i: 150993: 4cfcdb1 150991: 216aee4 v: v3
1 parent e5f95b1 commit cfc64dd

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: acc5c971babe3c59a32834ecac3ec7e064bf1dfa
8+
refs/heads/try2: 45c8cb3597256390c69ff5ad6a7ee565114a1ec7
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/typeck/check/regionck.rs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ macro_rules! ignore_err(
158158

159159
pub struct Rcx<'a> {
160160
fcx: &'a FnCtxt<'a>,
161-
errors_reported: uint,
162161

163162
// id of innermost fn or loop
164163
repeating_scope: ast::NodeId,
@@ -294,8 +293,7 @@ impl<'a, 'b> mc::Typer for &'a mut Rcx<'b> {
294293
}
295294

296295
pub fn regionck_expr(fcx: &FnCtxt, e: &ast::Expr) {
297-
let mut rcx = Rcx { fcx: fcx, errors_reported: 0,
298-
repeating_scope: e.id };
296+
let mut rcx = Rcx { fcx: fcx, repeating_scope: e.id };
299297
let rcx = &mut rcx;
300298
if fcx.err_count_since_creation() == 0 {
301299
// regionck assumes typeck succeeded
@@ -305,8 +303,7 @@ pub fn regionck_expr(fcx: &FnCtxt, e: &ast::Expr) {
305303
}
306304

307305
pub fn regionck_fn(fcx: &FnCtxt, blk: &ast::Block) {
308-
let mut rcx = Rcx { fcx: fcx, errors_reported: 0,
309-
repeating_scope: blk.id };
306+
let mut rcx = Rcx { fcx: fcx, repeating_scope: blk.id };
310307
let rcx = &mut rcx;
311308
if fcx.err_count_since_creation() == 0 {
312309
// regionck assumes typeck succeeded
@@ -951,8 +948,7 @@ fn constrain_regions_in_type_of_node(
951948
rcx: &mut Rcx,
952949
id: ast::NodeId,
953950
minimum_lifetime: ty::Region,
954-
origin: infer::SubregionOrigin) -> bool
955-
{
951+
origin: infer::SubregionOrigin) {
956952
//! Guarantees that any lifetimes which appear in the type of
957953
//! the node `id` (after applying adjustments) are valid for at
958954
//! least `minimum_lifetime`
@@ -970,15 +966,14 @@ fn constrain_regions_in_type_of_node(
970966
ty={}, ty0={}, id={}, minimum_lifetime={:?})",
971967
ty_to_str(tcx, ty), ty_to_str(tcx, ty0),
972968
id, minimum_lifetime);
973-
constrain_regions_in_type(rcx, minimum_lifetime, origin, ty)
969+
constrain_regions_in_type(rcx, minimum_lifetime, origin, ty);
974970
}
975971

976972
fn constrain_regions_in_type(
977973
rcx: &mut Rcx,
978974
minimum_lifetime: ty::Region,
979975
origin: infer::SubregionOrigin,
980-
ty: ty::t) -> bool
981-
{
976+
ty: ty::t) {
982977
/*!
983978
* Requires that any regions which appear in `ty` must be
984979
* superregions of `minimum_lifetime`. Also enforces the constraint
@@ -993,7 +988,6 @@ fn constrain_regions_in_type(
993988
* code that R corresponds to."
994989
*/
995990

996-
let e = rcx.errors_reported;
997991
let tcx = rcx.fcx.ccx.tcx;
998992

999993
debug!("constrain_regions_in_type(minimum_lifetime={}, ty={})",
@@ -1020,8 +1014,6 @@ fn constrain_regions_in_type(
10201014
r_sub, r_sup);
10211015
}
10221016
});
1023-
1024-
return e == rcx.errors_reported;
10251017
}
10261018

10271019
fn link_addr_of(rcx: &mut Rcx, expr: &ast::Expr,

0 commit comments

Comments
 (0)