Skip to content

Commit

Permalink
Update the help message for --rust-target
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Nov 28, 2024
1 parent 5f6c6cd commit 5f7c9d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions bindgen/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,)*)*
Expand Down
5 changes: 2 additions & 3 deletions bindgen/options/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
)
}
Expand Down

0 comments on commit 5f7c9d5

Please sign in to comment.