about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-03-11 13:30:55 +0100
committerGitHub <noreply@github.com>2025-03-11 13:30:55 +0100
commit03a79a77ac6ff0a7c89195fcb85f8b159a1ef583 (patch)
treeff80ac9c6c72c6e6250ed3fb23453d8179fa0390 /compiler/rustc_hir_analysis/src
parent3e67637c139e54d34323d2ff459d48f3fdf000ea (diff)
parentdcf6137b5cb16c5ed569fd0a17517cbaed48e604 (diff)
downloadrust-03a79a77ac6ff0a7c89195fcb85f8b159a1ef583.tar.gz
rust-03a79a77ac6ff0a7c89195fcb85f8b159a1ef583.zip
Rollup merge of #138315 - matthiaskrgr:nextback, r=fmease
use next_back() instead of last() on DoubleEndedIterator
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs
index ace5e34b382..fa061c80618 100644
--- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs
+++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs
@@ -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 \