Add test for issue-63496

This commit is contained in:
Yuki Okushi 2019-10-22 17:01:49 +09:00
parent 93fab980e3
commit 7a85c430fb
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,9 @@
trait A {
const C: usize;
fn f() -> ([u8; A::C], [u8; A::C]);
//~^ ERROR: type annotations needed: cannot resolve
//~| ERROR: type annotations needed: cannot resolve
}
fn main() {}

View file

@ -0,0 +1,21 @@
error[E0283]: type annotations needed: cannot resolve `_: A`
--> $DIR/issue-63496.rs:4:21
|
LL | const C: usize;
| --------------- required by `A::C`
LL |
LL | fn f() -> ([u8; A::C], [u8; A::C]);
| ^^^^
error[E0283]: type annotations needed: cannot resolve `_: A`
--> $DIR/issue-63496.rs:4:33
|
LL | const C: usize;
| --------------- required by `A::C`
LL |
LL | fn f() -> ([u8; A::C], [u8; A::C]);
| ^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0283`.