diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-08-13 13:59:19 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-08-14 02:17:30 +0000 |
| commit | f441fa08dac38a5a6ae471612543d7bf0097bffe (patch) | |
| tree | 2d403b804b21c4309a4a860931401db83026a638 /tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs | |
| parent | 1702d0fffc490e304cf93558c621f913ca062e62 (diff) | |
| download | rust-f441fa08dac38a5a6ae471612543d7bf0097bffe.tar.gz rust-f441fa08dac38a5a6ae471612543d7bf0097bffe.zip | |
Remove constness from `ImplSource::Param`
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs')
| -rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-and-const-params.rs | 11 |
1 files changed, 6 insertions, 5 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 7338fb245b3..89d74cecfdb 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,7 +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 cannot call + //~| ERROR mismatched types Foo } |
