Auto merge of #9877 - dswij:fix-init-bin-help, r=ehuss

Update suggestion message on bad project name error

closes #9876

Error message suggest adding `[bin]` to `Cargo.toml` which should be `[[bin]]` instead.
This commit is contained in:
bors 2021-09-06 14:45:41 +00:00
commit 941b123689
3 changed files with 10 additions and 10 deletions

View File

@ -185,7 +185,7 @@ fn check_name(
This can be done by setting the binary filename to `src/bin/{name}.rs` \
or change the name in Cargo.toml with:\n\
\n \
[bin]\n \
[[bin]]\n \
name = \"{name}\"\n \
path = \"src/main.rs\"\n\
",

View File

@ -290,7 +290,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/foo.bar.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"foo.bar\"
path = \"src/main.rs\"
@ -317,7 +317,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/test.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"test\"
path = \"src/main.rs\"

View File

@ -121,7 +121,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/foo.rs.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"foo.rs\"
path = \"src/main.rs\"
@ -143,7 +143,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/test.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"test\"
path = \"src/main.rs\"
@ -188,7 +188,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/pub.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"pub\"
path = \"src/main.rs\"
@ -210,7 +210,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/core.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"core\"
path = \"src/main.rs\"
@ -322,7 +322,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/10-invalid.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"10-invalid\"
path = \"src/main.rs\"
@ -443,7 +443,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"ⒶⒷⒸ\"
path = \"src/main.rs\"
@ -463,7 +463,7 @@ and set the binary name to be different from the package. \
This can be done by setting the binary filename to `src/bin/a¼.rs` \
or change the name in Cargo.toml with:
[bin]
[[bin]]
name = \"\"
path = \"src/main.rs\"