]> git.lizzy.rs Git - rust.git/commitdiff
Work around #19982 by rewriting test impls to not use anonymous
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 16 Dec 2014 01:20:15 +0000 (20:20 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 19 Dec 2014 08:29:59 +0000 (03:29 -0500)
lifetimes. This currently causes an ICE; it should (ideally) work, but
failing that at least give a structured error. For the purposes of
this PR, though, workaround is fine.

src/libcollections/btree/set.rs

index 8f75113c01dbf018ccb07bbb977217703be3838a..4ef2e681992aed87682b00fde9be91e6b448b549 100644 (file)
@@ -762,8 +762,8 @@ struct Counter<'a, 'b> {
         expected: &'b [int],
     }
 
-    impl<'a, 'b> FnMut(&int) -> bool for Counter<'a, 'b> {
-        extern "rust-call" fn call_mut(&mut self, (&x,): (&int,)) -> bool {
+    impl<'a, 'b, 'c> FnMut(&'c int) -> bool for Counter<'a, 'b> {
+        extern "rust-call" fn call_mut(&mut self, (&x,): (&'c int,)) -> bool {
             assert_eq!(x, self.expected[*self.i]);
             *self.i += 1;
             true