Add const_generics
test for impl-trait-with-const-arguments
This commit is contained in:
parent
702906581e
commit
6647eeefb9
3 changed files with 14 additions and 2 deletions
|
@ -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
|
|
@ -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
|
||||
|
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue