Skip to content

Commit f0b21c2

Browse files
committed
Rename ast::ExprKind::Again -> ast::ExprKind::Continue
1 parent 962d5c1 commit f0b21c2

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

src/librustc/hir/lowering.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ impl<'a> LoweringContext<'a> {
12101210
hir::ExprPath(hir_qself, self.lower_path(path))
12111211
}
12121212
ExprKind::Break(opt_ident) => hir::ExprBreak(self.lower_opt_sp_ident(opt_ident)),
1213-
ExprKind::Again(opt_ident) => hir::ExprAgain(self.lower_opt_sp_ident(opt_ident)),
1213+
ExprKind::Continue(opt_ident) => hir::ExprAgain(self.lower_opt_sp_ident(opt_ident)),
12141214
ExprKind::Ret(ref e) => hir::ExprRet(e.as_ref().map(|x| self.lower_expr(x))),
12151215
ExprKind::InlineAsm(InlineAsm {
12161216
ref inputs,

src/librustc_passes/ast_validation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<'a, 'v> Visitor<'v> for AstValidator<'a> {
7373
match expr.node {
7474
ExprKind::While(_, _, Some(ident)) | ExprKind::Loop(_, Some(ident)) |
7575
ExprKind::WhileLet(_, _, _, Some(ident)) | ExprKind::ForLoop(_, _, _, Some(ident)) |
76-
ExprKind::Break(Some(ident)) | ExprKind::Again(Some(ident)) => {
76+
ExprKind::Break(Some(ident)) | ExprKind::Continue(Some(ident)) => {
7777
self.check_label(ident.node, ident.span, expr.id);
7878
}
7979
_ => {}

src/librustc_resolve/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2988,7 +2988,7 @@ impl<'a> Resolver<'a> {
29882988
})
29892989
}
29902990

2991-
ExprKind::Break(Some(label)) | ExprKind::Again(Some(label)) => {
2991+
ExprKind::Break(Some(label)) | ExprKind::Continue(Some(label)) => {
29922992
match self.search_label(mtwt::resolve(label.node)) {
29932993
None => {
29942994
self.record_def(expr.id, err_path_resolution());

src/libsyntax/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ pub enum ExprKind {
10201020
/// A `break`, with an optional label to break
10211021
Break(Option<SpannedIdent>),
10221022
/// A `continue`, with an optional label
1023-
Again(Option<SpannedIdent>),
1023+
Continue(Option<SpannedIdent>),
10241024
/// A `return`, with an optional value to be returned
10251025
Ret(Option<P<Expr>>),
10261026

src/libsyntax/fold.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ pub fn noop_fold_expr<T: Folder>(Expr {id, node, span, attrs}: Expr, folder: &mu
12381238
respan(folder.new_span(label.span),
12391239
folder.fold_ident(label.node)))
12401240
),
1241-
ExprKind::Again(opt_ident) => ExprKind::Again(opt_ident.map(|label|
1241+
ExprKind::Continue(opt_ident) => ExprKind::Continue(opt_ident.map(|label|
12421242
respan(folder.new_span(label.span),
12431243
folder.fold_ident(label.node)))
12441244
),

src/libsyntax/parse/parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2285,14 +2285,14 @@ impl<'a> Parser<'a> {
22852285
}
22862286
if self.eat_keyword(keywords::Continue) {
22872287
let ex = if self.token.is_lifetime() {
2288-
let ex = ExprKind::Again(Some(Spanned{
2288+
let ex = ExprKind::Continue(Some(Spanned{
22892289
node: self.get_lifetime(),
22902290
span: self.span
22912291
}));
22922292
self.bump();
22932293
ex
22942294
} else {
2295-
ExprKind::Again(None)
2295+
ExprKind::Continue(None)
22962296
};
22972297
let hi = self.last_span.hi;
22982298
return Ok(self.mk_expr(lo, hi, ex, attrs));

src/libsyntax/print/pprust.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ impl<'a> State<'a> {
21842184
try!(space(&mut self.s));
21852185
}
21862186
}
2187-
ast::ExprKind::Again(opt_ident) => {
2187+
ast::ExprKind::Continue(opt_ident) => {
21882188
try!(word(&mut self.s, "continue"));
21892189
try!(space(&mut self.s));
21902190
if let Some(ident) = opt_ident {

src/libsyntax/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
755755
}
756756
visitor.visit_path(path, expression.id)
757757
}
758-
ExprKind::Break(ref opt_sp_ident) | ExprKind::Again(ref opt_sp_ident) => {
758+
ExprKind::Break(ref opt_sp_ident) | ExprKind::Continue(ref opt_sp_ident) => {
759759
walk_opt_sp_ident(visitor, opt_sp_ident);
760760
}
761761
ExprKind::Ret(ref optional_expression) => {

0 commit comments

Comments
 (0)