rust/tests/source/fn-simple.rs

32 lines
940 B
Rust
Raw Normal View History

2015-06-23 13:58:58 +00:00
fn simple(/*pre-comment on a function!?*/ i: i32/*yes, it's possible! */
,response: NoWay /* hose */) {"cool"}
fn weird_comment(/* /*/ double level */ comment */ x: Hello /*/*/* tripple, even */*/*/,
// Does this work?
y: World
) {
simple(/* does this preserve comments now? */ 42, NoWay)
}
2015-08-14 12:09:19 +00:00
fn generic<T>(arg: T) -> &SomeType
where T: Fn(// First arg
A,
// Second argument
B, C, D, /* pre comment */ E /* last comment */) -> &SomeType {
arg(a, b, c, d, e)
}
fn foo() -> ! {}
2015-09-11 10:24:13 +00:00
pub fn http_fetch_async(listener:Box< AsyncCORSResponseListener+Send >, script_chan: Box<ScriptChan+Send>) {
}
fn some_func<T:Box<Trait+Bound>>(val:T){}
2015-10-18 20:21:46 +00:00
fn zzzzzzzzzzzzzzzzzzzz<Type, NodeType>
(selff: Type, mut handle: node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>)
-> SearchStack<'a, K, V, Type, NodeType>{
}