Rollup merge of #78089 - varkor:opt_const_param_of-error, r=lcnr

Fix issue with specifying generic arguments for primitive types

Fixes https://github.com/rust-lang/rust/issues/78005.

r? @lcnr
This commit is contained in:
Guillaume Gomez 2020-10-19 18:20:23 +02:00 committed by GitHub
commit 684fbd50ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 6 deletions

View file

@ -0,0 +1,5 @@
fn foo() {
let x: usize<foo>; //~ ERROR const arguments are not allowed for this type
}
fn main() {}

View 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`.