1
Fork 0

allow complex expressions in assoc consts

This commit is contained in:
Bastian Kauschke 2020-08-05 18:59:53 +02:00
parent 0d54f571c1
commit 37c29adabc
4 changed files with 36 additions and 34 deletions

View file

@ -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() {}