about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-10 08:13:19 +0200
committerGitHub <noreply@github.com>2019-08-10 08:13:19 +0200
commit6743ad6726fa4144ca4616f728533fc819430d9d (patch)
tree4511bd3892961189dbecc72fe760aaffa6b0739b /src/liballoc/tests
parent52f9e80e5f4d67d8af4831a9e27a557b30b81761 (diff)
parent77bfd7fd1a939638a19ca30efad767c81bdd3d8b (diff)
downloadrust-6743ad6726fa4144ca4616f728533fc819430d9d.tar.gz
rust-6743ad6726fa4144ca4616f728533fc819430d9d.zip
Rollup merge of #63350 - iluuu1994:use-associated-type-bounds, r=Centril
Use associated_type_bounds where applicable - closes #61738
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/lib.rs1
-rw-r--r--src/liballoc/tests/str.rs10
2 files changed, 7 insertions, 4 deletions
diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs
index 6d774f3fecd..5723a30c0f3 100644
--- a/src/liballoc/tests/lib.rs
+++ b/src/liballoc/tests/lib.rs
@@ -8,6 +8,7 @@
 #![feature(trusted_len)]
 #![feature(try_reserve)]
 #![feature(unboxed_closures)]
+#![feature(associated_type_bounds)]
 
 use std::hash::{Hash, Hasher};
 use std::collections::hash_map::DefaultHasher;
diff --git a/src/liballoc/tests/str.rs b/src/liballoc/tests/str.rs
index c5198ca39fe..4332b2e90fd 100644
--- a/src/liballoc/tests/str.rs
+++ b/src/liballoc/tests/str.rs
@@ -1638,10 +1638,12 @@ mod pattern {
         }
     }
 
-    fn cmp_search_to_vec<'a, P: Pattern<'a>>(rev: bool, pat: P, haystack: &'a str,
-                                             right: Vec<SearchStep>)
-    where P::Searcher: ReverseSearcher<'a>
-    {
+    fn cmp_search_to_vec<'a>(
+        rev: bool,
+        pat: impl Pattern<'a, Searcher: ReverseSearcher<'a>>,
+        haystack: &'a str,
+        right: Vec<SearchStep>
+    ) {
         let mut searcher = pat.into_searcher(haystack);
         let mut v = vec![];
         loop {