macro_rules! empty { () => {}; } macro_rules! arg { () => { N //~^ ERROR generic parameters may not be used in const operations //~| ERROR generic parameters may not be used in const operations }; } struct Foo; fn foo() -> Foo<{ arg!{} arg!{} }> { loop {} } fn bar() -> [(); { empty!{}; N }] { loop {} } //~^ ERROR generic parameters may not be used in const operations fn main() {}