Skip to content

Commit 8bb62d1

Browse files
committedMar 7, 2019
Add a test for invalid const arguments
1 parent 88f755f commit 8bb62d1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
let _: Vec<&str, "a"> = Vec::new(); //~ ERROR wrong number of const arguments
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0107]: wrong number of const arguments: expected 0, found 1
2+
--> $DIR/invalid-constant-in-args.rs:2:22
3+
|
4+
LL | let _: Vec<&str, "a"> = Vec::new(); //~ ERROR wrong number of const arguments
5+
| ^^^ unexpected const argument
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0107`.

0 commit comments

Comments
 (0)
Please sign in to comment.