Skip to content

Remove deprecated flags #2408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@
## Changed

## Removed
* The following deprecated flags were removed: `--use-msvc-mangling`,
`--rustfmt-bindings` and `--size_t-is-usize`.

## Fixed

Expand Down
21 changes: 1 addition & 20 deletions bindgen-cli/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ struct BindgenCommand {
/// Conservatively generate inline namespaces to avoid name conflicts.
#[arg(long)]
conservative_inline_namespaces: bool,
/// MSVC C++ ABI mangling. DEPRECATED: Has no effect.
#[arg(long)]
use_msvc_mangling: bool,
/// Allowlist all the free-standing functions matching <REGEX>. Other non-allowlisted functions will not be generated.
#[arg(long, value_name = "REGEX")]
allowlist_function: Vec<String>,
Expand All @@ -266,20 +263,14 @@ struct BindgenCommand {
/// Do not record matching items in the regex sets. This disables reporting of unused items.
#[arg(long)]
no_record_matches: bool,
/// Ignored - this is enabled by default.
#[arg(long = "size_t-is-usize")]
size_t_is_usize: bool,
/// Do not bind size_t as usize (useful on platforms where those types are incompatible).
#[arg(long = "no-size_t-is-usize")]
no_size_t_is_usize: bool,
/// Do not format the generated bindings with rustfmt.
#[arg(long)]
no_rustfmt_bindings: bool,
/// Format the generated bindings with rustfmt. DEPRECATED: --rustfmt-bindings is now enabled by default. Disable with --no-rustfmt-bindings.
#[arg(long)]
rustfmt_bindings: bool,
/// The absolute path to the rustfmt configuration file. The configuration file will be used for formatting the bindings. This parameter is incompatible with --no-rustfmt-bindings.
#[arg(long, value_name = "PATH")]
#[arg(long, value_name = "PATH", conflicts_with("no_rustfmt_bindings"))]
rustfmt_configuration_file: Option<String>,
/// Avoid deriving PartialEq for types matching <REGEX>.
#[arg(long, value_name = "REGEX")]
Expand Down Expand Up @@ -449,7 +440,6 @@ where
rust_target,
use_core,
conservative_inline_namespaces,
use_msvc_mangling: _,
allowlist_function,
generate_inline_functions,
allowlist_type,
Expand All @@ -458,10 +448,8 @@ where
verbose,
dump_preprocessed_input,
no_record_matches,
size_t_is_usize: _,
no_size_t_is_usize,
no_rustfmt_bindings,
rustfmt_bindings: _,
rustfmt_configuration_file,
no_partialeq,
no_copy,
Expand Down Expand Up @@ -831,13 +819,6 @@ where
if let Some(path_str) = rustfmt_configuration_file {
let path = PathBuf::from(path_str);

if no_rustfmt_bindings {
return Err(Error::new(
ErrorKind::Other,
"Cannot supply both --rustfmt-configuration-file and --no-rustfmt-bindings",
));
}

if !path.is_absolute() {
return Err(Error::new(
ErrorKind::Other,
Expand Down