about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorAriel Uy <ariel.b.uy@gmail.com>2022-07-10 09:39:36 -0700
committerAriel Uy <ariel.b.uy@gmail.com>2022-07-17 11:23:09 -0700
commit8cf39a8c1908709831ab27937a53a2d6d0278ff6 (patch)
tree9825e904535eb86f7f7c159b157e03c2b73bc444 /tests
parent58cd01c2fcda07f97efcd908b50e5256cf084593 (diff)
downloadrust-8cf39a8c1908709831ab27937a53a2d6d0278ff6.tar.gz
rust-8cf39a8c1908709831ab27937a53a2d6d0278ff6.zip
Fix `mismatching_type_param_order` false positive
Previously was giving false positive when an impl had a nontrivial
generic argument such as a tuple. Don't lint on these cases.
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/mismatching_type_param_order.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/mismatching_type_param_order.rs b/tests/ui/mismatching_type_param_order.rs
index 8f286c9304c..8c0da84d8e9 100644
--- a/tests/ui/mismatching_type_param_order.rs
+++ b/tests/ui/mismatching_type_param_order.rs
@@ -57,4 +57,8 @@ fn main() {
         B: Copy,
     {
     }
+
+    // if the types are complicated, do not lint
+    impl<K, V, B> Foo<(K, V), B> {}
+    impl<K, V, A> Foo<(K, V), A> {}
 }