Deactivate feature gate explicit_generic_args_with_impl_trait

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron 2022-05-09 15:14:43 +01:00
parent 12872b6807
commit 640a461388
22 changed files with 32 additions and 169 deletions

View file

@ -0,0 +1,21 @@
// check-pass
trait Usizer {
fn m(self) -> usize;
}
fn f<const N: usize>(u: impl Usizer) -> usize {
N + u.m()
}
struct Usizable;
impl Usizer for Usizable {
fn m(self) -> usize {
16
}
}
fn main() {
assert_eq!(f::<4usize>(Usizable), 20usize);
}