We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
-
rustdoc-scrape-examples
When a crate has a dash (-) in its name, the unstable rustdoc-scrape-examples option stops working.
cargo new --lib da-sh && cd da-sh
echo "pub fn f() {}" >> src/lib.rs
mkdir examples && echo "fn main() { da_sh::f() }" > examples/e.rs
rustdoc
cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples=examples --open
f
sed -i 's/da-sh/dash/' Cargo.toml && sed -i 's/da_sh/dash/' examples/e.rs
No response
I'm not sure if this is an issue with rustdoc or cargo, maybe this issue should be moved to rustdoc repo.
cargo
cargo 1.58.0-nightly (94ca096af 2021-10-29)
The text was updated successfully, but these errors were encountered:
cc @willcrichton
Sorry, something went wrong.
Thanks for the concise repro @WaffleLapkin! I just created a PR for the fix.
Auto merge of #10037 - willcrichton:example-analyzer, r=alexcrichton
e3f2953
Fix --scrape-examples-target-crate using package name (with dashes) instead of crate name (with underscores) This PR fixes #10035.
7ee3ffc
-Zrustdoc-scrape-examples
examples/
Successfully merging a pull request may close this issue.
Problem
When a crate has a dash (
-
) in its name, the unstablerustdoc-scrape-examples
option stops working.Steps
cargo new --lib da-sh && cd da-sh
echo "pub fn f() {}" >> src/lib.rs
mkdir examples && echo "fn main() { da_sh::f() }" > examples/e.rs
rustdoc
:cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples=examples --open
f
(example is missing):sed -i 's/da-sh/dash/' Cargo.toml && sed -i 's/da_sh/dash/' examples/e.rs
rustdoc
:cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples=examples --open
f
(example is present):Possible Solution(s)
No response
Notes
I'm not sure if this is an issue with
rustdoc
orcargo
, maybe this issue should be moved torustdoc
repo.Version
The text was updated successfully, but these errors were encountered: