Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Option 1. The docstring precedes the attributes by convention. Here is an example of the docstring for std::vec::Vec. However, if using cargo doc to generate documentation, it works just fine if y...
Answer
#3: Post edited
Option 1. The docstring _precedes_ the attributes. [Here is an example of the docstring for `std::vec::Vec`](https://doc.rust-lang.org/stable/src/alloc/vec/mod.rs.html#394).
- Option 1. The docstring _precedes_ the attributes *by convention.* [Here is an example of the docstring for `std::vec::Vec`](https://doc.rust-lang.org/stable/src/alloc/vec/mod.rs.html#394).
- However, if using `cargo doc` to generate documentation, it works just fine if you put it after as well.
#2: Post edited
The docstring _precedes_ the attributes. [Here is an example of the docstring for `std::vec::Vec`](https://doc.rust-lang.org/stable/src/alloc/vec/mod.rs.html#394).
- Option 1. The docstring _precedes_ the attributes. [Here is an example of the docstring for `std::vec::Vec`](https://doc.rust-lang.org/stable/src/alloc/vec/mod.rs.html#394).