Skip to content

Commit 3830c0c

Browse files
committed
Auto merge of #13957 - iawia002:docs, r=weihanglo
Fix wrong type of rustc-flags in documentation When I tried to add some custom configuration according to the documentation in https://doc.rust-lang.org/cargo/reference/config.html#configuration-format, I encountered the following error: ``` error: expected a string, but found a array for `rustc-flags` in /xxx/.cargo/config.toml ``` I believe the type of `rustc-flags` should be a string: https://github.com/rust-lang/cargo/blob/95b921ba592ec968d4638e124f5273bb42a25528/src/doc/src/reference/config.md?plain=1#L1243-L1253
2 parents 95b921b + 63e8461 commit 3830c0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/doc/src/reference/config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ rustflags = ["…", "…"] # custom flags for `rustc`
170170
[target.<triple>.<links>] # `links` build script override
171171
rustc-link-lib = ["foo"]
172172
rustc-link-search = ["/path/to/foo"]
173-
rustc-flags = ["-L", "/some/path"]
173+
rustc-flags = "-L /some/path"
174174
rustc-cfg = ['key="value"']
175175
rustc-env = {key = "value"}
176176
rustc-cdylib-link-arg = [""]

0 commit comments

Comments
 (0)