Skip to content

Commit 961e378

Browse files
authored
Rollup merge of #59007 - varkor:invalid-const-arg-test, r=petrochenkov
Add a test for invalid const arguments Closes #58811.
2 parents 72d4c1e + 8bb62d1 commit 961e378

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)