cargo-fmt

This commit is contained in:
Sébastien Besnier 2020-11-03 09:40:50 +01:00
parent f4c1af0f19
commit 6dbde806d6
2 changed files with 8 additions and 18 deletions

View file

@ -288,9 +288,7 @@ mod test_can {
"# "#
); );
let arena = Bump::new(); let arena = Bump::new();
let CanExprOut { let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
problems, ..
} = can_expr_with(&arena, test_home(), src);
// Here we have 2 issues: // Here we have 2 issues:
// 1. `g` doesn't match the previous annotation named `f`, so we // 1. `g` doesn't match the previous annotation named `f`, so we
@ -299,7 +297,7 @@ mod test_can {
// `LookupNotInScope`. // `LookupNotInScope`.
assert_eq!(problems.len(), 2); assert_eq!(problems.len(), 2);
assert!(problems.iter().all(|problem| match problem { assert!(problems.iter().all(|problem| match problem {
Problem::SignatureDefMismatch{..} => true, Problem::SignatureDefMismatch { .. } => true,
Problem::RuntimeError(RuntimeError::LookupNotInScope(_, _)) => true, Problem::RuntimeError(RuntimeError::LookupNotInScope(_, _)) => true,
_ => false, _ => false,
})); }));
@ -316,9 +314,7 @@ mod test_can {
"# "#
); );
let arena = Bump::new(); let arena = Bump::new();
let CanExprOut { let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
problems, ..
} = can_expr_with(&arena, test_home(), src);
// Here we have 2 issues: // Here we have 2 issues:
// 1. `g` doesn't match the previous annotation named `f`, so we // 1. `g` doesn't match the previous annotation named `f`, so we
@ -327,7 +323,7 @@ mod test_can {
// `LookupNotInScope`. // `LookupNotInScope`.
assert_eq!(problems.len(), 2); assert_eq!(problems.len(), 2);
assert!(problems.iter().all(|problem| match problem { assert!(problems.iter().all(|problem| match problem {
Problem::SignatureDefMismatch{..} => true, Problem::SignatureDefMismatch { .. } => true,
Problem::RuntimeError(RuntimeError::LookupNotInScope(_, _)) => true, Problem::RuntimeError(RuntimeError::LookupNotInScope(_, _)) => true,
_ => false, _ => false,
})); }));
@ -345,9 +341,7 @@ mod test_can {
"# "#
); );
let arena = Bump::new(); let arena = Bump::new();
let CanExprOut { let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
problems, ..
} = can_expr_with(&arena, test_home(), src);
assert_eq!(problems.len(), 1); assert_eq!(problems.len(), 1);
assert!(problems.iter().all(|problem| match problem { assert!(problems.iter().all(|problem| match problem {
@ -368,9 +362,7 @@ mod test_can {
"# "#
); );
let arena = Bump::new(); let arena = Bump::new();
let CanExprOut { let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
problems, ..
} = can_expr_with(&arena, test_home(), src);
assert_eq!(problems.len(), 1); assert_eq!(problems.len(), 1);
assert!(problems.iter().all(|problem| match problem { assert!(problems.iter().all(|problem| match problem {
@ -390,9 +382,7 @@ mod test_can {
"# "#
); );
let arena = Bump::new(); let arena = Bump::new();
let CanExprOut { let CanExprOut { problems, .. } = can_expr_with(&arena, test_home(), src);
problems, ..
} = can_expr_with(&arena, test_home(), src);
assert_eq!(problems.len(), 1); assert_eq!(problems.len(), 1);
println!("{:#?}", problems); println!("{:#?}", problems);

View file

@ -110,7 +110,7 @@ fn generate_module_doc<'a>(
_ => (acc, None), _ => (acc, None),
}, },
AnnotatedBody{ ann_pattern, .. } => match ann_pattern.value { AnnotatedBody { ann_pattern, .. } => match ann_pattern.value {
Pattern::Identifier(identifier) => { Pattern::Identifier(identifier) => {
// Check if the definition is exposed // Check if the definition is exposed
if exposed_ident_ids if exposed_ident_ids