1
Fork 0

Add const_generics test for impl-trait-with-const-arguments

This commit is contained in:
varkor 2020-10-03 18:48:56 +01:00
parent 702906581e
commit 6647eeefb9
3 changed files with 14 additions and 2 deletions

View file

@ -1,5 +1,5 @@
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
--> $DIR/impl-trait-with-const-arguments.rs:20:20
--> $DIR/impl-trait-with-const-arguments.rs:24:20
|
LL | assert_eq!(f::<4usize>(Usizable), 20usize);
| ^^^^^^ explicit generic argument not allowed

View file

@ -0,0 +1,8 @@
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
--> $DIR/impl-trait-with-const-arguments.rs:24:20
|
LL | assert_eq!(f::<4usize>(Usizable), 20usize);
| ^^^^^^ explicit generic argument not allowed
error: aborting due to previous error

View file

@ -1,4 +1,8 @@
#![feature(min_const_generics)]
// revisions: full min
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(min, feature(min_const_generics))]
trait Usizer {
fn m(self) -> usize;