Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/test/ui/const-generics/invalid-constant-in-args.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
let _: Vec<&str, "a"> = Vec::new(); //~ ERROR wrong number of const arguments
}
9 changes: 9 additions & 0 deletions src/test/ui/const-generics/invalid-constant-in-args.stderr
Original file line number Diff line number Diff line change
@@ -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`.