Closed
Description
Given the following code: link
#![feature(const_generics, const_generics_defaults)]
#![allow(incomplete_features)]
struct Foo<const N: usize, const M: usize = { struct Bar<const L: usize = N>; N }>;
The current output is:
error[E0401]: can't use generic parameters from outer function
--> src/lib.rs:4:75
|
4 | struct Foo<const N: usize, const M: usize = { struct Bar<const L: usize = N>; N }>;
| - const parameter from outer function ^ use of generic parameter from outer function
Ideally the output should shouldn't talk about functions but struct definitions instead