Skip to content

Commit 0bdd12f

Browse files
committed
Rename last to is_last
1 parent 33dcf1e commit 0bdd12f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_lint/src/unused.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ impl EarlyLintPass for UnusedParens {
13101310
}
13111311
ast::TyKind::TraitObject(bounds, _) | ast::TyKind::ImplTrait(_, bounds) => {
13121312
for i in 0..bounds.len() {
1313-
let last = i == bounds.len() - 1;
1313+
let is_last = i == bounds.len() - 1;
13141314

13151315
if let ast::GenericBound::Trait(poly_trait_ref) = &bounds[i] {
13161316
let fn_with_explicit_ret_ty = if let [.., segment] =
@@ -1321,7 +1321,7 @@ impl EarlyLintPass for UnusedParens {
13211321
{
13221322
self.in_no_bounds_pos.insert(
13231323
ret_ty.id,
1324-
if last {
1324+
if is_last {
13251325
NoBoundsException::OneBound
13261326
} else {
13271327
NoBoundsException::None
@@ -1345,7 +1345,7 @@ impl EarlyLintPass for UnusedParens {
13451345
.unwrap_or(false);
13461346

13471347
if let ast::Grouping::Parenthesized = poly_trait_ref.grouping
1348-
&& (last || !fn_with_explicit_ret_ty)
1348+
&& (is_last || !fn_with_explicit_ret_ty)
13491349
&& !dyn2015_exception
13501350
{
13511351
let s = poly_trait_ref.span;

0 commit comments

Comments
 (0)