mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Add a test for invalid const arguments
This commit is contained in:
parent
88f755f8a8
commit
8bb62d18f3
3
src/test/ui/const-generics/invalid-constant-in-args.rs
Normal file
3
src/test/ui/const-generics/invalid-constant-in-args.rs
Normal file
@ -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`.
|
Loading…
Reference in New Issue
Block a user