blob: d8b23bc01a96dc40d8c2eac272745c8bf8e56be7 (
plain)
1
2
3
4
5
6
7
8
9
|
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
trait Trait<T> {
fn fnc<const N: usize = "">(&self) {} //~ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
fn foo<const N: usize = { std::mem::size_of::<T>() }>(&self) {} //~ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
}
fn main() {}
|