diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs index 78a64b901..89d74cecf 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs @@ -1,4 +1,4 @@ -#![feature(const_trait_impl)] +#![feature(const_trait_impl, effects)] #![feature(generic_arg_infer)] #![feature(generic_const_exprs)] #![allow(incomplete_features)] @@ -6,9 +6,10 @@ struct Foo<const N: usize>; impl<const N: usize> Foo<N> { - fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> { - Foo - } + fn add<A: ~const Add42>(self) -> Foo<{ A::add(N) }> { + //~^ ERROR mismatched types + Foo + } } #[const_trait] @@ -24,6 +25,7 @@ impl const Add42 for () { fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> { //~^ ERROR `~const` is not allowed here + //~| ERROR mismatched types Foo } |