mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
16 lines
241 B
Rust
16 lines
241 B
Rust
#[rustfmt::skip]
|
|
macro_rules! y {
|
|
() => {
|
|
{ N }
|
|
//~^ ERROR: generic parameters may not be used in const operations
|
|
};
|
|
}
|
|
|
|
struct A<const N: usize>;
|
|
|
|
fn foo<const N: usize>() -> A<{ y!() }> {
|
|
A::<1>
|
|
}
|
|
|
|
fn main() {}
|