Closed
Description
Given the following code: link
struct S1 {
struct S2 {
}
}
fn main() {
}
The current output is:
Compiling playground v0.0.1 (/playground)
error: expected identifier, found keyword `struct`
--> src/main.rs:2:5
|
2 | struct S2 {
| ^^^^^^ expected identifier, found keyword
error: could not compile `playground` due to previous error
Ideally the output should include a note informing the user that the declaration of another struct within a struct is not allowed and they should use separate declarations. (Wording might need a bit of tweaking).