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() {
^~~
Currently, class constructors can not be documented with the /** */-style docstrings, else the compiler complains about unexpected tokens.
This code:
produces the following output: