about summary refs log tree commit diff
path: root/compiler/rustc_macros/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-08-14 16:28:56 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-08-14 16:28:56 +0000
commitb67cd4c6cf4abc47056b1f45957a8ab8f3e7a559 (patch)
treefbbe3692f7d7b594c87905125a6700191715adde /compiler/rustc_macros/src
parent30017c36d6b5e3382ee7cf018d330a6a4a937d39 (diff)
downloadrust-b67cd4c6cf4abc47056b1f45957a8ab8f3e7a559.tar.gz
rust-b67cd4c6cf4abc47056b1f45957a8ab8f3e7a559.zip
cleanup: Remove useless `[T].iter().last()`
Diffstat (limited to 'compiler/rustc_macros/src')
-rw-r--r--compiler/rustc_macros/src/diagnostics/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/utils.rs b/compiler/rustc_macros/src/diagnostics/utils.rs
index 060799e981d..c310b99d535 100644
--- a/compiler/rustc_macros/src/diagnostics/utils.rs
+++ b/compiler/rustc_macros/src/diagnostics/utils.rs
@@ -146,7 +146,7 @@ impl<'ty> FieldInnerTy<'ty> {
             };
 
             let path = &ty_path.path;
-            let ty = path.segments.iter().last().unwrap();
+            let ty = path.segments.last().unwrap();
             let syn::PathArguments::AngleBracketed(bracketed) = &ty.arguments else {
                 panic!("expected bracketed generic arguments");
             };