Add test for issue-63496
This commit is contained in:
parent
93fab980e3
commit
7a85c430fb
2 changed files with 30 additions and 0 deletions
9
src/test/ui/associated-const/issue-63496.rs
Normal file
9
src/test/ui/associated-const/issue-63496.rs
Normal 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() {}
|
||||
21
src/test/ui/associated-const/issue-63496.stderr
Normal file
21
src/test/ui/associated-const/issue-63496.stderr
Normal 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`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue