Fix issue with specifying generic arguments for primitive types
This commit is contained in:
parent
28928c750c
commit
c0d29fe7d7
3 changed files with 24 additions and 6 deletions
5
src/test/ui/usize-generic-argument-parent.rs
Normal file
5
src/test/ui/usize-generic-argument-parent.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
fn foo() {
|
||||
let x: usize<foo>; //~ ERROR const arguments are not allowed for this type
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
9
src/test/ui/usize-generic-argument-parent.stderr
Normal file
9
src/test/ui/usize-generic-argument-parent.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0109]: const arguments are not allowed for this type
|
||||
--> $DIR/usize-generic-argument-parent.rs:2:18
|
||||
|
|
||||
LL | let x: usize<foo>;
|
||||
| ^^^ const argument not allowed
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0109`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue