]> git.lizzy.rs Git - rust.git/blob - tests/target/trait.rs
Merge pull request #175 from marcusklaas/assignment
[rust.git] / tests / target / trait.rs
1 // Test traits
2
3 trait Foo {
4     fn bar(x: i32) -> Baz<U> {
5         Baz::new()
6     }
7
8     fn baz(a: AAAAAAAAAAAAAAAAAAAAAA, b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB) -> RetType;
9
10     fn foo(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, // Another comment
11            b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
12            -> RetType; // Some comment
13
14     fn baz(&mut self) -> i32;
15
16     fn increment(&mut self, x: i32);
17
18     fn read(&mut self, x: BufReader<R> /* Used to be MemReader */)
19         where R: Read;
20 }
21
22 pub trait WriteMessage {
23     fn write_message(&mut self, &FrontendMessage) -> io::Result<()>;
24 }
25
26 trait Runnable {
27     fn handler(self: &Runnable);
28 }