diff --git a/bindgen/features.rs b/bindgen/features.rs index 915e8ebef0..9991522497 100644 --- a/bindgen/features.rs +++ b/bindgen/features.rs @@ -120,10 +120,6 @@ macro_rules! define_rust_targets { } } - #[cfg(feature = "__cli")] - /// Strings of allowed `RustTarget` values - pub(crate) const RUST_TARGET_STRINGS: &[&str] = &[$(concat!("1.", stringify!($minor)),)*]; - #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] pub(crate) struct RustFeatures { $($(pub(crate) $feature: bool,)*)* diff --git a/bindgen/options/cli.rs b/bindgen/options/cli.rs index 747ff2d5e0..a20ebb1020 100644 --- a/bindgen/options/cli.rs +++ b/bindgen/options/cli.rs @@ -3,7 +3,7 @@ use crate::{ callbacks::{ AttributeInfo, DeriveInfo, ItemInfo, ParseCallbacks, TypeKind, }, - features::RUST_TARGET_STRINGS, + features::EARLIEST_STABLE_RUST, regex_set::RegexSet, Abi, AliasVariation, Builder, CodegenConfig, EnumVariation, FieldVisibilityKind, Formatter, MacroTypeVariation, NonCopyUnionStyle, @@ -21,8 +21,7 @@ use std::{fs::File, process::exit}; fn rust_target_help() -> String { format!( - "Version of the Rust compiler to target. Valid options are: {:?}. Defaults to {}.", - RUST_TARGET_STRINGS, + "Version of the Rust compiler to target. Any Rust version after {EARLIEST_STABLE_RUST} is supported. Defaults to {}.", RustTarget::default() ) }