cuviper / autocfg

Automatic cfg for Rust compiler features
Apache License 2.0
95 stars 24 forks source link

Add a method to control the `--edition` #67

Open cuviper opened 4 months ago

cuviper commented 4 months ago

If not specified, rustc defaults to the original 2015 edition. For many things it doesn't make much difference, but there could be new features that people want to probe that only work in newer editions. We could have something like:

impl AutoCfg {
    pub fn set_edition(&mut self, edition: Into<String>) { ... }
}

We may need to be careful about built-in probes though, to make sure they don't care about edition differences if possible.