-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Document having only src/bin/*.rs
binaries is valid
#14463
Comments
src/bin/*.rs
binaries are validsrc/bin/*.rs
binaries is valid
Thanks for providing this feedback on the confusion you had! It looks like the suggested change is the addition of
It feels odd to call out that a default is not required, that is generally the case for a default. For brainstorming purposes, another approach is something like
|
@epage Thank you for the quick response! I support your fix.
|
Since no one seems to submit another proposal, I’m going to make a PR based on the @epage ‘s text to keep this issue from being stale. |
This commit clarifies the doc by stating we can place a binary source as `src/main.rs` and/or in `src/bin/`. Wording is suggested by Ed Page (@epage). Closes rust-lang#14463.
This commit clarifies the doc by stating we can place a binary source as `src/main.rs` and/or in `src/bin/`. Wording is suggested by Ed Page (@epage). Closes rust-lang#14463.
docs: bin source can be `src/main.rs` and/or in `src/bin/` ### What does this PR try to resolve? This commit clarifies the doc by stating we can place a binary source as `src/main.rs` and/or in `src/bin/`. Wording is suggested by Ed Page (`@epage).` ### How should we test and review this PR? (It seems the only way is to check the chenge visually...) ### Additional information Closes #14463.
This commit clarifies the doc by stating we can place a binary source as `src/main.rs` and/or in `src/bin/`. Wording is suggested by Ed Page (@epage). Closes rust-lang#14463.
Problem
I found the following section of the cargo book could make readers think they must provide
src/main.rs
.cargo/src/doc/src/reference/cargo-targets.md
Lines 30 to 34 in 59ecb11
However, it is also valid to have only
src/bin/*.rs
binaries and not to havesrc/main.rs
.I believe clarifying this situation on the book will help readers when arranging codes for binaries.
Proposed Solution
Changing the section like below should work:
Notes
No response
The text was updated successfully, but these errors were encountered: