about summary refs log tree commit diff
path: root/tests/ui/cross-crate/auxiliary/cci_impl_lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/cross-crate/auxiliary/cci_impl_lib.rs')
-rw-r--r--tests/ui/cross-crate/auxiliary/cci_impl_lib.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/cross-crate/auxiliary/cci_impl_lib.rs b/tests/ui/cross-crate/auxiliary/cci_impl_lib.rs
new file mode 100644
index 00000000000..0db0037b203
--- /dev/null
+++ b/tests/ui/cross-crate/auxiliary/cci_impl_lib.rs
@@ -0,0 +1,16 @@
+#![crate_name="cci_impl_lib"]
+
+pub trait uint_helpers {
+    fn to<F>(&self, v: usize, f: F) where F: FnMut(usize);
+}
+
+impl uint_helpers for usize {
+    #[inline]
+    fn to<F>(&self, v: usize, mut f: F) where F: FnMut(usize) {
+        let mut i = *self;
+        while i < v {
+            f(i);
+            i += 1;
+        }
+    }
+}