[fine] Clean up warnings
This commit is contained in:
parent
a8ab907eee
commit
1cc5ce6ca9
1 changed files with 13 additions and 13 deletions
|
|
@ -2038,7 +2038,7 @@ pub fn check(s: &Semantics) {
|
|||
TreeKind::Pattern => check_pattern(s, tree),
|
||||
TreeKind::WildcardPattern => {}
|
||||
|
||||
TreeKind::MatchArm => check_match_arm(s, tree),
|
||||
TreeKind::MatchArm => {}
|
||||
TreeKind::MatchBody => check_match_body(s, t, tree),
|
||||
TreeKind::MatchExpression => {}
|
||||
}
|
||||
|
|
@ -2236,22 +2236,22 @@ fn check_pattern(s: &Semantics, tree: &Tree) {
|
|||
}
|
||||
}
|
||||
|
||||
fn check_match_body(s: &Semantics, t: TreeRef, tree: &Tree) {
|
||||
fn check_match_body(s: &Semantics, t: TreeRef, _tree: &Tree) {
|
||||
let _ = s.type_of(t); // Checks arm count and compatibility.
|
||||
|
||||
let arms: Vec<_> = tree
|
||||
.children_of_kind(s.syntax_tree, TreeKind::MatchArm)
|
||||
.collect();
|
||||
// TODO: completeness checks
|
||||
|
||||
if arms.len() > 0 {
|
||||
for arm in &arms[1..] {
|
||||
// TODO: How do I know if it's complete?
|
||||
// TODO: How do I know if it's redundant?
|
||||
}
|
||||
}
|
||||
}
|
||||
// let arms: Vec<_> = tree
|
||||
// .children_of_kind(s.syntax_tree, TreeKind::MatchArm)
|
||||
// .collect();
|
||||
|
||||
fn check_match_arm(s: &Semantics, tree: &Tree) {}
|
||||
// if arms.len() > 0 {
|
||||
// for arm in &arms[1..] {
|
||||
// // TODO: How do I know if it's complete?
|
||||
// // TODO: How do I know if it's redundant?
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue