Skip to content
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

Can't use crate-level attributes with cargo dependencies doc comment #134

Open
Andrew15-5 opened this issue Jul 25, 2024 · 0 comments
Open

Comments

@Andrew15-5
Copy link

Thing like #![feature(duration_constructors)] must be placed before any doc comment, but /// \``cargo` doc comment (apparently) must be placed before crate-level attributes (or anything else, really).
So this is a deadlock situation.

#!/usr/bin/env rust-script
/// ```cargo
/// [dependencies]
/// chrono = "0.4.38"
/// ```
#![feature(duration_constructors)]
#!/usr/bin/env rust-script
#![feature(duration_constructors)]
/// ```cargo
/// [dependencies]
/// chrono = "0.4.38"
/// ```

This means that such attributes type (crate-level) must be ignored/skipped by rust-script or something (I don't know the implementation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant