1
Fork 0

use next_back() instead of last() on DoubleEndedIterator

This commit is contained in:
Matthias Krüger 2025-03-10 19:03:51 +01:00
parent 2b285cd5f0
commit dcf6137b5c
2 changed files with 2 additions and 2 deletions

View file

@ -1520,7 +1520,7 @@ fn generics_args_err_extend<'a>(
})
.collect();
if args.len() > 1
&& let Some(span) = args.into_iter().last()
&& let Some(span) = args.into_iter().next_back()
{
err.note(
"generic arguments are not allowed on both an enum and its variant's path \