1
Fork 0

Remove constness from ImplSource::Param

This commit is contained in:
Deadbeef 2023-08-13 13:59:19 +00:00
parent 1702d0fffc
commit f441fa08da
29 changed files with 122 additions and 189 deletions

View file

@ -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
}