We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 51cc1a8 + dcf6137 commit 1cf279eCopy full SHA for 1cf279e
compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs
@@ -1520,7 +1520,7 @@ fn generics_args_err_extend<'a>(
1520
})
1521
.collect();
1522
if args.len() > 1
1523
- && let Some(span) = args.into_iter().last()
+ && let Some(span) = args.into_iter().next_back()
1524
{
1525
err.note(
1526
"generic arguments are not allowed on both an enum and its variant's path \
compiler/rustc_parse/src/parser/diagnostics.rs
@@ -2107,7 +2107,7 @@ impl<'a> Parser<'a> {
2107
ast::GenericBound::Trait(poly) => Some(poly),
2108
_ => None,
2109
2110
- .last()
+ .next_back()
2111
2112
err.span_suggestion_verbose(
2113
poly.span.shrink_to_hi(),
0 commit comments