run rustfmt

This commit is contained in:
Greg Shuflin 2021-11-12 01:13:13 -08:00
parent c5f7616303
commit f9349edf77

View File

@ -789,21 +789,18 @@ fn functions() {
})))]
);
let source = r#"
fn some_function() {
}"#;
assert_ast2!(source, vec![fn_decl(
Signature {
name: rc("some_function"),
operator: false,
type_anno: None,
params: vec![]
},
assert_ast2!(
source,
vec![fn_decl(
Signature { name: rc("some_function"), operator: false, type_anno: None, params: vec![] },
vec![].into()
)]);
)]
);
}
#[test]
@ -906,20 +903,19 @@ fn impls() {
use Declaration::{FuncDecl, Impl};
let block = vec![
FuncDecl(Signature { name: rc("yolo"), operator: false, params: vec![], type_anno: None },
vec![].into()),
FuncDecl(Signature { name: rc("swagg"), operator: false, params: vec![], type_anno: None },
vec![].into()
)
FuncDecl(
Signature { name: rc("yolo"), operator: false, params: vec![], type_anno: None },
vec![].into(),
),
FuncDecl(
Signature { name: rc("swagg"), operator: false, params: vec![], type_anno: None },
vec![].into(),
),
];
assert_ast2!(
"impl Heh { fn yolo() { }; fn swagg() { } }",
vec![decl(Impl {
type_name: ty_simple("Heh"),
interface_name: None,
block: block.clone(),
})]
vec![decl(Impl { type_name: ty_simple("Heh"), interface_name: None, block: block.clone() })]
);
//TODO `"impl Heh<X> { fn yolo() { }; fn swagg() { }; }"` ought to work