Skip to content

Commit

Permalink
Add const_generics test for impl-trait-with-const-arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Oct 3, 2020
1 parent 7029065 commit 6647eee
Show file tree
Hide file tree
Showing 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
Expand Down
@@ -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;
Expand Down

0 comments on commit 6647eee

Please sign in to comment.