From 5f7c9d5c30356c12d011b6e2edb2f53c036545d5 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Wed, 27 Nov 2024 23:20:07 -0500 Subject: [PATCH] Update the help message for `--rust-target` --- bindgen/features.rs | 4 ---- bindgen/options/cli.rs | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) 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() ) }