Skip to content

Commit 5a013b2

Browse files
committed
Fix coerce-to-bang test
This was explicitly testing the behaviour which is now no longer permitted.
1 parent 9b28901 commit 5a013b2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/test/compile-fail/coerce-to-bang.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ fn call_foo_f() {
5656
}
5757

5858
fn array_a() {
59-
// Accepted: return is coerced to `!` just fine, and then `22` can be
60-
// because we already diverged.
61-
let x: [!; 2] = [return, 22];
59+
// Accepted: return is coerced to `!` just fine, but `22` cannot be.
60+
let x: [!; 2] = [return, 22]; //~ ERROR mismatched types
6261
}
6362

6463
fn array_b() {

0 commit comments

Comments
 (0)