2015-05-03 17:12:39 -05:00
|
|
|
// 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);
|
|
|
|
|
2015-09-27 14:46:05 -05:00
|
|
|
fn read(&mut self, x: BufReader<R> /* Used to be MemReader */) where R: Read;
|
2015-05-03 17:12:39 -05:00
|
|
|
}
|
2015-07-19 07:33:02 -05:00
|
|
|
|
|
|
|
pub trait WriteMessage {
|
|
|
|
fn write_message(&mut self, &FrontendMessage) -> io::Result<()>;
|
|
|
|
}
|
2015-07-24 12:54:38 -05:00
|
|
|
|
|
|
|
trait Runnable {
|
|
|
|
fn handler(self: &Runnable);
|
|
|
|
}
|
2015-10-21 15:21:14 -05:00
|
|
|
|
|
|
|
trait TraitWithExpr {
|
|
|
|
fn fn_with_expr(x: [i32; 1]);
|
|
|
|
}
|