Skip to content

Commit 8267ff7

Browse files
committed
rollup merge of #27664: birkenfeld/patch-1
2 parents 2abc936 + 29945d5 commit 8267ff7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libsyntax/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ pub enum Expr_ {
941941
/// `Foo {x: 1, .. base}`, where `base` is the `Option<Expr>`.
942942
ExprStruct(Path, Vec<Field>, Option<P<Expr>>),
943943

944-
/// A vector literal constructed from one repeated element.
944+
/// An array literal constructed from one repeated element.
945945
///
946946
/// For example, `[1u8; 5]`. The first expression is the element
947947
/// to be repeated; the second is the number of times to repeat it.

src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ impl<'a> Parser<'a> {
20752075
// Nonempty vector.
20762076
let first_expr = try!(self.parse_expr_nopanic());
20772077
if self.check(&token::Semi) {
2078-
// Repeating vector syntax: [ 0; 512 ]
2078+
// Repeating array syntax: [ 0; 512 ]
20792079
try!(self.bump());
20802080
let count = try!(self.parse_expr_nopanic());
20812081
try!(self.expect(&token::CloseDelim(token::Bracket)));
@@ -3260,7 +3260,7 @@ impl<'a> Parser<'a> {
32603260
pat = PatTup(fields);
32613261
}
32623262
token::OpenDelim(token::Bracket) => {
3263-
// Parse [pat,pat,...] as vector pattern
3263+
// Parse [pat,pat,...] as slice pattern
32643264
try!(self.bump());
32653265
let (before, slice, after) = try!(self.parse_pat_vec_elements());
32663266
try!(self.expect(&token::CloseDelim(token::Bracket)));

0 commit comments

Comments
 (0)