Skip to content

Commit

Permalink
Add test for issue-63496
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Oct 22, 2019
1 parent 93fab98 commit 7a85c43
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui/associated-const/issue-63496.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 21 additions & 0 deletions src/test/ui/associated-const/issue-63496.stderr
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit 7a85c43

Please sign in to comment.