-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Milestone
Description
Currently, class constructors can not be documented with the /** */-style docstrings, else the compiler complains about unexpected tokens.
This code:
fn main() {}
class foo {
let bar: bool;
/**
* Creates a foo object
*/
new() {
self.bar = true;
io::println("foo");
}
}
produces the following output:
testpad.rs:10:4: 10:7 error: unexpected token: 'new'
testpad.rs:10 new() {
^~~
Metadata
Metadata
Assignees
Labels
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.