diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-14 21:48:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-14 21:48:47 +0200 |
| commit | 603ee15f7cf0bc7631ba0c845528aa598422f1fa (patch) | |
| tree | aea8f0d1f54bfd4326f96eef1692aaad3742a2cd /compiler/rustc_macros/src/diagnostics/utils.rs | |
| parent | 93e895bc6436a2a32bb17ed49ea68ffb4aa34e72 (diff) | |
| parent | b67cd4c6cf4abc47056b1f45957a8ab8f3e7a559 (diff) | |
| download | rust-603ee15f7cf0bc7631ba0c845528aa598422f1fa.tar.gz rust-603ee15f7cf0bc7631ba0c845528aa598422f1fa.zip | |
Rollup merge of #145401 - estebank:remove-useless-iter, r=compiler-errors
cleanup: Remove useless `[T].iter().last()`
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/utils.rs')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/utils.rs | 2 |
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"); }; |
