rustversion-detect 0.2.2

Parses the output of rustc --version for use in build scripts
Documentation
[package]
name = "rustversion-detect"
version = "0.2.2"
authors = ["David Tolnay <dtolnay@gmail.com>", "Techcable"]
categories = ["development-tools::build-utils"]
keywords = ["autocfg", "cfg", "nightly", "rustc", "version"]
description = "Parses the output of rustc --version for use in build scripts"
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Techcable/rustversion-detect"
# 1.27 - #[must_use] on methods
# 1.31 - First version supporting Rust 2018
#
# While we could support older versions than 1.31,
# there are few good reasons for doing so.
rust-version = "1.31"
# Exclude compile benchmarks & git metadata
exclude = [".gitignore", "/.github", "/benchcompile"]

[package.metadata.cdocs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]

[[test]]
name = "test_const"
required-features = ["compat-maybe-const-fn"]

[dependencies]
# Used only for backwards compatibility
maybe-const-fn = { version = "0.1.1", optional = true }

[features]
default = ["compat-maybe-const-fn"]
# Re-export the maybe_const_fn! macro for compatibility.
# This was added in v0.2.1 and is on by default for compatibility for v0.2.0.
# It will be removed in the next semver-breaking release.
compat-maybe-const-fn = ["maybe-const-fn"]

[lints.clippy]
## groups ##
cargo = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }

# excessively pedantic
too-many-lines = "allow"
cast-lossless = "allow"

# depends on the MSRV, but currently usable
must-use-candidate = "warn" # #[must_use] on methods requires 1.27

# cannot use these on our MSRV
cast-possible-truncation = "allow" # TryFrom requires v1.34