We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5419b2c commit 373b9d6Copy full SHA for 373b9d6
src/librustc/lint/builtin.rs
@@ -58,7 +58,7 @@ impl LintPass for WhileTrue {
58
59
fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
60
match e.node {
61
- ast::ExprWhile(cond, _) => {
+ ast::ExprWhile(cond, _, _) => {
62
match cond.node {
63
ast::ExprLit(lit) => {
64
match lit.node {
@@ -1073,7 +1073,7 @@ impl LintPass for UnnecessaryParens {
1073
1074
let (value, msg, struct_lit_needs_parens) = match e.node {
1075
ast::ExprIf(cond, _, _) => (cond, "`if` condition", true),
1076
- ast::ExprWhile(cond, _) => (cond, "`while` condition", true),
+ ast::ExprWhile(cond, _, _) => (cond, "`while` condition", true),
1077
ast::ExprMatch(head, _) => (head, "`match` head expression", true),
1078
ast::ExprRet(Some(value)) => (value, "`return` value", false),
1079
ast::ExprAssign(_, value) => (value, "assigned value", false),
src/librustc/middle/cfg/construct.rs
@@ -227,7 +227,7 @@ impl<'a> CFGBuilder<'a> {
227
self.add_node(expr.id, [then_exit, else_exit]) // 4, 5
228
}
229
230
- ast::ExprWhile(ref cond, ref body) => {
+ ast::ExprWhile(ref cond, ref body, _) => {
231
//
232
// [pred]
233
// |
src/librustc/middle/check_loop.rs
@@ -35,7 +35,7 @@ impl<'a> Visitor<Context> for CheckLoopVisitor<'a> {
35
36
fn visit_expr(&mut self, e: &ast::Expr, cx:Context) {
37
38
- ast::ExprWhile(ref e, ref b) => {
+ ast::ExprWhile(ref e, ref b, _) => {
39
self.visit_expr(&**e, cx);
40
self.visit_block(&**b, Loop);
41
src/librustc/middle/expr_use_visitor.rs
@@ -410,7 +410,7 @@ impl<'d,'t,TYPER:mc::Typer> ExprUseVisitor<'d,'t,TYPER> {
410
self.walk_block(&**blk);
411
412
413
- ast::ExprWhile(ref cond_expr, ref blk) => {
+ ast::ExprWhile(ref cond_expr, ref blk, _) => {
414
self.consume_expr(&**cond_expr);
415
416
src/librustc/middle/liveness.rs
@@ -1017,7 +1017,7 @@ impl<'a> Liveness<'a> {
1017
self.propagate_through_expr(&**cond, ln)
1018
1019
1020
- ExprWhile(ref cond, ref blk) => {
+ ExprWhile(ref cond, ref blk, _) => {
1021
self.propagate_through_loop(expr,
1022
WhileLoop(cond.clone()),
1023
&**blk,
src/librustc/middle/region.rs
@@ -496,7 +496,7 @@ fn resolve_expr(visitor: &mut RegionResolutionVisitor,
496
visitor.region_maps.mark_as_terminating_scope(body.id);
497
498
499
- ast::ExprWhile(expr, body) => {
+ ast::ExprWhile(expr, body, _) => {
500
visitor.region_maps.mark_as_terminating_scope(expr.id);
501
502
src/librustc/middle/resolve.rs
@@ -5622,7 +5622,7 @@ impl<'a> Resolver<'a> {
5622
visit::walk_expr(self, expr, ());
5623
5624
5625
- ExprLoop(_, Some(label)) => {
+ ExprLoop(_, Some(label)) | ExprWhile(_, _, Some(label)) => {
5626
self.with_label_rib(|this| {
5627
let def_like = DlDef(DefLabel(expr.id));
5628
src/librustc/middle/trans/debuginfo.rs
@@ -3489,7 +3489,7 @@ fn populate_scope_map(cx: &CrateContext,
3489
3490
3491
3492
- ast::ExprWhile(ref cond_exp, ref loop_body) => {
+ ast::ExprWhile(ref cond_exp, ref loop_body, _) => {
3493
walk_expr(cx, &**cond_exp, scope_stack, scope_map);
3494
3495
with_new_scope(cx,
src/librustc/middle/trans/expr.rs
@@ -900,7 +900,7 @@ fn trans_rvalue_stmt_unadjusted<'a>(bcx: &'a Block<'a>,
900
ast::ExprRet(ex) => {
901
controlflow::trans_ret(bcx, ex)
902
903
904
controlflow::trans_while(bcx, expr.id, &**cond, &**body)
905
906
ast::ExprForLoop(ref pat, ref head, ref body, _) => {
src/librustc/middle/typeck/check/mod.rs
@@ -3757,7 +3757,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
3757
check_then_else(fcx, &**cond, &**then_blk, opt_else_expr.clone(),
3758
id, expr.span, expected);
3759
3760
3761
check_expr_has_type(fcx, &**cond, ty::mk_bool());
3762
check_block_no_value(fcx, &**body);
3763
let cond_ty = fcx.expr_ty(&**cond);
0 commit comments