Skip to content

Commit

Permalink
Rollup merge of #66800 - jyn514:combine-const-match-tests, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Combine similar tests for const match

See #66788 (comment) for context.
  • Loading branch information
tmandry committed Nov 27, 2019
2 parents 999fd56 + 9617d7c commit a40494b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
12 changes: 11 additions & 1 deletion src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,14 @@ const fn f(e: E) {
}
}

fn main() {}
const fn g(e: E) -> usize {
match e {
_ => 0
}
}

fn main() {
const X: usize = g(E::C);
assert_eq!(X, 0);
assert_eq!(g(E::A), 0);
}
21 changes: 0 additions & 21 deletions src/test/ui/consts/control-flow/single-arm-match-wild.rs

This file was deleted.

0 comments on commit a40494b

Please sign in to comment.