run rustfmt
This commit is contained in:
parent
c5f7616303
commit
f9349edf77
@ -789,21 +789,18 @@ fn functions() {
|
|||||||
})))]
|
})))]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
let source = r#"
|
let source = r#"
|
||||||
fn some_function() {
|
fn some_function() {
|
||||||
|
|
||||||
}"#;
|
}"#;
|
||||||
|
|
||||||
assert_ast2!(source, vec![fn_decl(
|
assert_ast2!(
|
||||||
Signature {
|
source,
|
||||||
name: rc("some_function"),
|
vec![fn_decl(
|
||||||
operator: false,
|
Signature { name: rc("some_function"), operator: false, type_anno: None, params: vec![] },
|
||||||
type_anno: None,
|
|
||||||
params: vec![]
|
|
||||||
},
|
|
||||||
vec![].into()
|
vec![].into()
|
||||||
)]);
|
)]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -906,20 +903,19 @@ fn impls() {
|
|||||||
use Declaration::{FuncDecl, Impl};
|
use Declaration::{FuncDecl, Impl};
|
||||||
|
|
||||||
let block = vec![
|
let block = vec![
|
||||||
FuncDecl(Signature { name: rc("yolo"), operator: false, params: vec![], type_anno: None },
|
FuncDecl(
|
||||||
vec![].into()),
|
Signature { name: rc("yolo"), operator: false, params: vec![], type_anno: None },
|
||||||
FuncDecl(Signature { name: rc("swagg"), operator: false, params: vec![], type_anno: None },
|
vec![].into(),
|
||||||
vec![].into()
|
),
|
||||||
)
|
FuncDecl(
|
||||||
|
Signature { name: rc("swagg"), operator: false, params: vec![], type_anno: None },
|
||||||
|
vec![].into(),
|
||||||
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
assert_ast2!(
|
assert_ast2!(
|
||||||
"impl Heh { fn yolo() { }; fn swagg() { } }",
|
"impl Heh { fn yolo() { }; fn swagg() { } }",
|
||||||
vec![decl(Impl {
|
vec![decl(Impl { type_name: ty_simple("Heh"), interface_name: None, block: block.clone() })]
|
||||||
type_name: ty_simple("Heh"),
|
|
||||||
interface_name: None,
|
|
||||||
block: block.clone(),
|
|
||||||
})]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//TODO `"impl Heh<X> { fn yolo() { }; fn swagg() { }; }"` ought to work
|
//TODO `"impl Heh<X> { fn yolo() { }; fn swagg() { }; }"` ought to work
|
||||||
|
Loading…
Reference in New Issue
Block a user