jeremyBanks / rust-exe

#!/usr/bin/env rust
https://docs.rs/rust-exe
1 stars 1 forks source link

extract dependency metadata from `use` and `extern crate` item doc strings #28

Open jeremyBanks opened 2 years ago

jeremyBanks commented 2 years ago

These should all work:

///[#!std]: 0.1.0 (-default +std)
use ::syn;
///[#!syn]: toml ({ version = "1.2.4", path = "foo/bar" })
///[#!proc_macro2]: ^1
use ::{syn, proc_macro2}
///[#!syn]: =0.1.0 (-default +std)
use ::{syn::{parse2}}

Multiple versions specified for the same dependency should produce an INFO if they're compatible, or an ERROR if they're not.

jeremyBanks commented 2 years ago
///[#!syn] +extra-traits

should probably work too. Equivalent to

///[#!syn] * (+extra-traits)

or

///[#!syn] toml ({ version = "*", features = [ "extra-traits" ] })