Skip to content

Commit 2cf2d68

Browse files
committed
unevaluated_fixed_size_array_len
1 parent 2b7bf54 commit 2cf2d68

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/ui/consts/const-eval-array-len-in-impl.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// https://github.com/rust-lang/rust/issues/49208
1+
//! This checks that compiler correctly evaluate constant array lengths within trait `impl` headers.
2+
//!
3+
//! Regression test for <https://github.com/rust-lang/rust/issues/49208>.
24
35
trait Foo {
46
fn foo();

tests/ui/consts/const-eval-array-len-in-impl.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `[(); 0]: Foo` is not satisfied
2-
--> $DIR/unevaluated_fixed_size_array_len.rs:12:6
2+
--> $DIR/const-eval-array-len-in-impl.rs:14:6
33
|
44
LL | <[(); 0] as Foo>::foo()
55
| ^^^^^^^ the trait `Foo` is not implemented for `[(); 0]`

0 commit comments

Comments
 (0)