You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected the command to finish without error and the creation of the file README.html or doc/README.html.
Instead, I got the following error message:
error: doc/README.html: No such file or directory (os error 2)
Indeed, this file does not exist and we expected the command to create it! The error message is not really helping in this case and does not explain that it cannot create the file because the directory doc/ does not exists.
When launched on a standalone markdown file, rustdoc expects the output directory to exist. It is not created if missing (as it is the case when launched on *.rs file or with cargo doc), even if we specify it with --output argument.
I see two solutions to the problem:
change the error message and tell the user that the output directory (which default to doc/) does not exist;
recursively create the output directory.
I can propose a PR to close this issue. I just need someone to tell me which solutions to code. I think that the second solution would be a better choice as it would be more consistent with the other rustdoc uses case (on *.rs files or with cargo doc) which create the output directory.
I tried this command:
I expected the command to finish without error and the creation of the file
README.html
ordoc/README.html
.Instead, I got the following error message:
Indeed, this file does not exist and we expected the command to create it! The error message is not really helping in this case and does not explain that it cannot create the file because the directory
doc/
does not exists.When launched on a standalone markdown file,
rustdoc
expects the output directory to exist. It is not created if missing (as it is the case when launched on*.rs
file or with cargo doc), even if we specify it with--output
argument.I see two solutions to the problem:
doc/
) does not exist;I can propose a PR to close this issue. I just need someone to tell me which solutions to code. I think that the second solution would be a better choice as it would be more consistent with the other
rustdoc
uses case (on*.rs
files or with cargo doc) which create the output directory.Meta
rustc --version --verbose
:This bug is also present on the current stable release (v 1.42).
The text was updated successfully, but these errors were encountered: