about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorNick Cameron <nrc@ncameron.org>2015-10-22 10:08:17 +1300
committerNick Cameron <nrc@ncameron.org>2015-10-22 10:08:17 +1300
commitca50af7f03f7be722f1406a4fbcd2fb74cd751dc (patch)
treec9a0f9bd5b59b91ee67b1e76b3c64b3154f9ef1b /tests
parent8e2547b6bcdbac2cadfafe0d8f2795bf9fa1c4da (diff)
parentbe9e7dc68963db304533f3885ea6d27fddc81ae6 (diff)
Merge pull request #516 from eefriedman/remove-walk
Don't use `visit::walk_*`.  Instead, recurse by hand.
Diffstat (limited to 'tests')
-rw-r--r--tests/source/trait.rs33
-rw-r--r--tests/target/impl.rs3
-rw-r--r--tests/target/trait.rs4
3 files changed, 40 insertions, 0 deletions
diff --git a/tests/source/trait.rs b/tests/source/trait.rs
new file mode 100644
index 00000000000..e04c7182421
--- /dev/null
+++ b/tests/source/trait.rs
@@ -0,0 +1,33 @@
+// Test traits
+
+trait Foo {
+    fn bar(x: i32   ) -> Baz<   U> {       Baz::new()
+  }
+
+    fn baz(a: AAAAAAAAAAAAAAAAAAAAAA,
+b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
+-> RetType;
+
+    fn foo(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, // Another comment
+b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
+           -> RetType              ; // Some comment
+
+    fn baz(&mut self        ) -> i32          ;
+
+fn increment(&     mut self, x: i32         );
+
+    fn read(&mut self,          x: BufReader<R> /* Used to be MemReader */)
+    where R: Read;
+}
+
+pub trait WriteMessage {
+    fn write_message  (&mut self, &FrontendMessage) ->   io::Result<()>;
+}
+
+trait Runnable {
+    fn handler(self: & Runnable   );
+}
+
+trait TraitWithExpr {
+    fn fn_with_expr(x: [i32;       1]);
+}
diff --git a/tests/target/impl.rs b/tests/target/impl.rs
new file mode 100644
index 00000000000..df44377a6bf
--- /dev/null
+++ b/tests/target/impl.rs
@@ -0,0 +1,3 @@
+// Test impls
+
+impl<T> JSTraceable for SmallVec<[T; 1]> {}
diff --git a/tests/target/trait.rs b/tests/target/trait.rs
index 3e0a7ed692a..ffc5b87c6ea 100644
--- a/tests/target/trait.rs
+++ b/tests/target/trait.rs
@@ -25,3 +25,7 @@ pub trait WriteMessage {
 trait Runnable {
     fn handler(self: &Runnable);
 }
+
+trait TraitWithExpr {
+    fn fn_with_expr(x: [i32; 1]);
+}