-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Doc comments are allowed on match arms #21823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would expect no error, just no documentation. Does rustdoc produce anything for this? |
@alexchandel The problem is that using fn main() {
/// Say hello world
println!("Hello, world!")
}
So it's not very coherent. |
It's parses because attributes are allowed on match arms, and |
Triage: no change |
Current output:
|
Sounds acceptable, should I close this? It was not a huge issue to begin with. |
A very minor issue but I noticed that rustc accepts to build code like this:
I would expect an error at
/// doc
since there's no item to document here.The text was updated successfully, but these errors were encountered: