@@ -13,7 +13,7 @@ use rustc_lint::LateContext;
13
13
use rustc_span:: { sym, symbol, Span } ;
14
14
15
15
/// The essential nodes of a desugared for loop as well as the entire span:
16
- /// `for pat in arg { body }` becomes `(pat, arg, body)`. Return `(pat, arg, body, span)`.
16
+ /// `for pat in arg { body }` becomes `(pat, arg, body)`. Returns `(pat, arg, body, span)`.
17
17
pub struct ForLoop < ' tcx > {
18
18
/// `for` loop item
19
19
pub pat : & ' tcx hir:: Pat < ' tcx > ,
@@ -264,7 +264,7 @@ impl<'a> Range<'a> {
264
264
}
265
265
}
266
266
267
- /// Represent the pre-expansion arguments of a `vec!` invocation.
267
+ /// Represents the pre-expansion arguments of a `vec!` invocation.
268
268
pub enum VecArgs < ' a > {
269
269
/// `vec![elem; len]`
270
270
Repeat ( & ' a hir:: Expr < ' a > , & ' a hir:: Expr < ' a > ) ,
@@ -398,7 +398,7 @@ impl<'hir> WhileLet<'hir> {
398
398
}
399
399
}
400
400
401
- /// Converts a hir binary operator to the corresponding `ast` type.
401
+ /// Converts a ` hir` binary operator to the corresponding `ast` type.
402
402
#[ must_use]
403
403
pub fn binop ( op : hir:: BinOpKind ) -> ast:: BinOpKind {
404
404
match op {
@@ -436,7 +436,7 @@ pub enum VecInitKind {
436
436
WithExprCapacity ( HirId ) ,
437
437
}
438
438
439
- /// Checks if given expression is an initialization of `Vec` and returns its kind.
439
+ /// Checks if the given expression is an initialization of `Vec` and returns its kind.
440
440
pub fn get_vec_init_kind < ' tcx > ( cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' tcx > ) -> Option < VecInitKind > {
441
441
if let ExprKind :: Call ( func, args) = expr. kind {
442
442
match func. kind {
0 commit comments