2015-04-28 16:53:33 -05:00
|
|
|
// Tests different fns
|
|
|
|
|
|
|
|
fn foo(a: AAAA, b: BBB, c: CCC) -> RetType {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-06-05 09:56:59 -05:00
|
|
|
fn foo(a: AAAA, b: BBB /* some, weird, inline comment */, c: CCC) -> RetType
|
2015-04-28 16:53:33 -05:00
|
|
|
where T: Blah
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-06-05 09:56:59 -05:00
|
|
|
fn foo(a: AAA /* (comment) */)
|
2015-04-28 16:53:33 -05:00
|
|
|
where T: Blah
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
|
|
|
|
b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
|
|
|
|
-> RetType
|
|
|
|
where T: Blah
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn foo<U, T>(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
|
|
|
|
b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
|
|
|
|
-> RetType
|
|
|
|
where T: Blah,
|
|
|
|
U: dsfasdfasdfasd
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-07-01 18:20:07 -05:00
|
|
|
fn foo<U: Fn(A) -> B /* paren inside generics */>() {
|
|
|
|
}
|
|
|
|
|
2015-04-28 16:53:33 -05:00
|
|
|
impl Foo {
|
|
|
|
fn with_no_errors<T, F>(&mut self, f: F) -> T
|
|
|
|
where F: FnOnce(&mut Resolver) -> T
|
|
|
|
{
|
|
|
|
}
|
2015-05-01 06:08:22 -05:00
|
|
|
|
|
|
|
fn foo(mut self, mut bar: u32) {
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar(self, mut bazz: u32) {
|
|
|
|
}
|
2015-04-28 16:53:33 -05:00
|
|
|
}
|
2015-04-28 23:44:29 -05:00
|
|
|
|
2015-04-30 21:52:11 -05:00
|
|
|
pub fn render<'a,
|
|
|
|
N: Clone + 'a,
|
|
|
|
E: Clone + 'a,
|
|
|
|
G: Labeller<'a, N, E> + GraphWalk<'a, N, E>,
|
|
|
|
W: Write>
|
2015-04-28 23:44:29 -05:00
|
|
|
(g: &'a G,
|
|
|
|
w: &mut W)
|
|
|
|
-> io::Result<()> {
|
|
|
|
render_opts(g, w, &[])
|
|
|
|
}
|
2015-05-17 06:35:11 -05:00
|
|
|
|
2015-05-25 06:25:06 -05:00
|
|
|
const fn foo() {
|
|
|
|
x;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub const fn foo() {
|
|
|
|
x;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
const fn foo() {
|
|
|
|
x;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-17 06:35:11 -05:00
|
|
|
fn main() {
|
|
|
|
let _ = function(move || 5);
|
|
|
|
let _ = move || 42;
|
|
|
|
}
|