-
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
Fix wrong type of rustc-flags in documentation #13957
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
@@ -170,7 +170,7 @@ rustflags = ["…", "…"] # custom flags for `rustc` | |||
[target.<triple>.<links>] # `links` build script override | |||
rustc-link-lib = ["foo"] | |||
rustc-link-search = ["/path/to/foo"] | |||
rustc-flags = ["-L", "/some/path"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Looks like it only accepts strings. Good catch and thanks!
cargo/src/cargo/util/context/target.rs
Lines 159 to 165 in 5da2858
"rustc-flags" => { | |
let flags = value.string(key)?; | |
let whence = format!("target config `{}.{}` (in {})", target_key, key, flags.1); | |
let (paths, links) = BuildOutput::parse_rustc_flags(flags.0, &whence)?; | |
output.library_paths.extend(paths); | |
output.library_links.extend(links); | |
} |
@bors r+ Thanks for the contribution! |
☀️ Test successful - checks-actions |
Update cargo 7 commits in 84dc5dc11a9007a08f27170454da6097265e510e..a8d72c675ee52dd57f0d8f2bae6655913c15b2fb 2024-05-20 18:57:08 +0000 to 2024-05-24 03:34:17 +0000 - Improve error description when deserializing partial field struct (rust-lang/cargo#13956) - fix: remove symlink dir on Windows (rust-lang/cargo#13910) - Fix wrong type of rustc-flags in documentation (rust-lang/cargo#13957) - Add more high level traces (rust-lang/cargo#13951) - upgrade gix from 0.62 to 0.63 (rust-lang/cargo#13948) - Use `i32` rather than `usize` as "default integer" in library template (rust-lang/cargo#13939) - fetch specific commits even if the github fast path fails (rust-lang/cargo#13946) r? ghost
Update cargo 7 commits in 84dc5dc11a9007a08f27170454da6097265e510e..a8d72c675ee52dd57f0d8f2bae6655913c15b2fb 2024-05-20 18:57:08 +0000 to 2024-05-24 03:34:17 +0000 - Improve error description when deserializing partial field struct (rust-lang/cargo#13956) - fix: remove symlink dir on Windows (rust-lang/cargo#13910) - Fix wrong type of rustc-flags in documentation (rust-lang/cargo#13957) - Add more high level traces (rust-lang/cargo#13951) - upgrade gix from 0.62 to 0.63 (rust-lang/cargo#13948) - Use `i32` rather than `usize` as "default integer" in library template (rust-lang/cargo#13939) - fetch specific commits even if the github fast path fails (rust-lang/cargo#13946) r? ghost
Update cargo 7 commits in 84dc5dc11a9007a08f27170454da6097265e510e..a8d72c675ee52dd57f0d8f2bae6655913c15b2fb 2024-05-20 18:57:08 +0000 to 2024-05-24 03:34:17 +0000 - Improve error description when deserializing partial field struct (rust-lang/cargo#13956) - fix: remove symlink dir on Windows (rust-lang/cargo#13910) - Fix wrong type of rustc-flags in documentation (rust-lang/cargo#13957) - Add more high level traces (rust-lang/cargo#13951) - upgrade gix from 0.62 to 0.63 (rust-lang/cargo#13948) - Use `i32` rather than `usize` as "default integer" in library template (rust-lang/cargo#13939) - fetch specific commits even if the github fast path fails (rust-lang/cargo#13946) r? ghost
Update cargo 7 commits in 84dc5dc11a9007a08f27170454da6097265e510e..a8d72c675ee52dd57f0d8f2bae6655913c15b2fb 2024-05-20 18:57:08 +0000 to 2024-05-24 03:34:17 +0000 - Improve error description when deserializing partial field struct (rust-lang/cargo#13956) - fix: remove symlink dir on Windows (rust-lang/cargo#13910) - Fix wrong type of rustc-flags in documentation (rust-lang/cargo#13957) - Add more high level traces (rust-lang/cargo#13951) - upgrade gix from 0.62 to 0.63 (rust-lang/cargo#13948) - Use `i32` rather than `usize` as "default integer" in library template (rust-lang/cargo#13939) - fetch specific commits even if the github fast path fails (rust-lang/cargo#13946) r? ghost
Update cargo 7 commits in 84dc5dc11a9007a08f27170454da6097265e510e..a8d72c675ee52dd57f0d8f2bae6655913c15b2fb 2024-05-20 18:57:08 +0000 to 2024-05-24 03:34:17 +0000 - Improve error description when deserializing partial field struct (rust-lang/cargo#13956) - fix: remove symlink dir on Windows (rust-lang/cargo#13910) - Fix wrong type of rustc-flags in documentation (rust-lang/cargo#13957) - Add more high level traces (rust-lang/cargo#13951) - upgrade gix from 0.62 to 0.63 (rust-lang/cargo#13948) - Use `i32` rather than `usize` as "default integer" in library template (rust-lang/cargo#13939) - fetch specific commits even if the github fast path fails (rust-lang/cargo#13946) r? ghost
Update cargo 7 commits in 84dc5dc11a9007a08f27170454da6097265e510e..a8d72c675ee52dd57f0d8f2bae6655913c15b2fb 2024-05-20 18:57:08 +0000 to 2024-05-24 03:34:17 +0000 - Improve error description when deserializing partial field struct (rust-lang/cargo#13956) - fix: remove symlink dir on Windows (rust-lang/cargo#13910) - Fix wrong type of rustc-flags in documentation (rust-lang/cargo#13957) - Add more high level traces (rust-lang/cargo#13951) - upgrade gix from 0.62 to 0.63 (rust-lang/cargo#13948) - Use `i32` rather than `usize` as "default integer" in library template (rust-lang/cargo#13939) - fetch specific commits even if the github fast path fails (rust-lang/cargo#13946) r? ghost
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:
I believe the type of
rustc-flags
should be a string:cargo/src/doc/src/reference/config.md
Lines 1243 to 1253 in 95b921b