mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 00:47:16 +00:00
Fix comment
This commit is contained in:
parent
ed769a3bc4
commit
d637163435
1 changed files with 3 additions and 3 deletions
|
@ -36,9 +36,9 @@ impl LintPass for RedundantFieldNames {
|
|||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantFieldNames {
|
||||
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
|
||||
// Do not care about range expressions.
|
||||
// They could have redundant field name when desugared to structs.
|
||||
// e.g. `start..end` is desugared to `Range { start: start, end: end }`
|
||||
// Ignore all macros including range expressions.
|
||||
// They can have redundant field names when expanded.
|
||||
// e.g. range expression `start..end` is desugared to `Range { start: start, end: end }`
|
||||
if in_macro(expr.span) || is_range_expression(expr.span) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue