提交 8267ff7a 编写于 作者: A Alex Crichton

rollup merge of #27664: birkenfeld/patch-1

......@@ -941,7 +941,7 @@ pub enum Expr_ {
/// `Foo {x: 1, .. base}`, where `base` is the `Option<Expr>`.
ExprStruct(Path, Vec<Field>, Option<P<Expr>>),
/// A vector literal constructed from one repeated element.
/// An array literal constructed from one repeated element.
///
/// For example, `[1u8; 5]`. The first expression is the element
/// to be repeated; the second is the number of times to repeat it.
......
......@@ -2075,7 +2075,7 @@ pub fn parse_bottom_expr(&mut self) -> PResult<P<Expr>> {
// Nonempty vector.
let first_expr = try!(self.parse_expr_nopanic());
if self.check(&token::Semi) {
// Repeating vector syntax: [ 0; 512 ]
// Repeating array syntax: [ 0; 512 ]
try!(self.bump());
let count = try!(self.parse_expr_nopanic());
try!(self.expect(&token::CloseDelim(token::Bracket)));
......@@ -3260,7 +3260,7 @@ pub fn parse_pat_nopanic(&mut self) -> PResult<P<Pat>> {
pat = PatTup(fields);
}
token::OpenDelim(token::Bracket) => {
// Parse [pat,pat,...] as vector pattern
// Parse [pat,pat,...] as slice pattern
try!(self.bump());
let (before, slice, after) = try!(self.parse_pat_vec_elements());
try!(self.expect(&token::CloseDelim(token::Bracket)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册