about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-01-13 20:35:58 +0000
committerbors <bors@rust-lang.org>2021-01-13 20:35:58 +0000
commitdcd8c8e739f4a55d467808e59ecb48c7a4d73137 (patch)
tree47cbe9922a8ae474550cc7ccb5f2db627d2d00eb
parentdfb41f47979cbda90100de67f2318b2a54243ed9 (diff)
parent2c6dc8801fca12415ae73895cd81225008f427a8 (diff)
downloadrust-dcd8c8e739f4a55d467808e59ecb48c7a4d73137.tar.gz
rust-dcd8c8e739f4a55d467808e59ecb48c7a4d73137.zip
Auto merge of #77524 - Patryk27:fixes/66228, r=estebank
Rework diagnostics for wrong number of generic args (fixes #66228 and #71924)

This PR reworks the `wrong number of {} arguments` message, so that it provides more details and contextual hints.
-rw-r--r--clippy_lints/src/utils/hir_utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/utils/hir_utils.rs b/clippy_lints/src/utils/hir_utils.rs
index a8fbb2ffaf0..1ec92500ce8 100644
--- a/clippy_lints/src/utils/hir_utils.rs
+++ b/clippy_lints/src/utils/hir_utils.rs
@@ -744,7 +744,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
                     }
                     for segment in path.segments {
                         segment.ident.name.hash(&mut self.s);
-                        self.hash_generic_args(segment.generic_args().args);
+                        self.hash_generic_args(segment.args().args);
                     }
                 },
                 QPath::TypeRelative(ref ty, ref segment) => {