allow complex expressions in assoc consts
This commit is contained in:
parent
0d54f571c1
commit
37c29adabc
4 changed files with 36 additions and 34 deletions
|
@ -26,12 +26,4 @@ trait Foo {
|
|||
const ASSOC: usize;
|
||||
}
|
||||
|
||||
impl<const N: usize> Foo for [u8; N] {
|
||||
const ASSOC: usize = N + 1;
|
||||
//~^ ERROR generic parameters must not be used inside of non trivial constant values
|
||||
// FIXME(min_const_generics): We probably have to allow this as we can
|
||||
// already allow referencing type parameters here on stable.
|
||||
}
|
||||
|
||||
|
||||
fn main() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue