Skip to content
Permalink
Browse files

Add a test for invalid const arguments

  • Loading branch information...
varkor committed Mar 7, 2019
1 parent 88f755f commit 8bb62d18f3645fd4fc83096a3fec3d7e30a7674b
@@ -0,0 +1,3 @@
fn main() {
let _: Vec<&str, "a"> = Vec::new(); //~ ERROR wrong number of const arguments
}
@@ -0,0 +1,9 @@
error[E0107]: wrong number of const arguments: expected 0, found 1
--> $DIR/invalid-constant-in-args.rs:2:22
|
LL | let _: Vec<&str, "a"> = Vec::new(); //~ ERROR wrong number of const arguments
| ^^^ unexpected const argument

error: aborting due to previous error

For more information about this error, try `rustc --explain E0107`.

0 comments on commit 8bb62d1

Please sign in to comment.
You can’t perform that action at this time.