Skip to content
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

Fix warnings. #2753

Merged
merged 2 commits into from
Feb 11, 2024
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: 1 addition & 1 deletion bindgen-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ fn build_flags_output_helper(builder: &bindgen::Builder) {

let flags_quoted: Vec<String> = command_line_flags
.iter()
.map(|x| format!("{}", shlex::quote(x)))
.map(|x| format!("{}", shlex::try_quote(x).unwrap()))
.collect();
let flags_str = flags_quoted.join(" ");
println!("{}", flags_str);
Expand Down
29 changes: 0 additions & 29 deletions bindgen/ir/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ pub(crate) trait HasTypeParamInArray {
fn has_type_param_in_array(&self, ctx: &BindgenContext) -> bool;
}

/// A trait for determining if some IR thing has float or not.
pub(crate) trait HasFloat {
/// Returns `true` if the thing has float, and `false` otherwise.
fn has_float(&self, ctx: &BindgenContext) -> bool;
}

/// A trait for iterating over an item and its parents and up its ancestor chain
/// up to (but not including) the implicit root module.
pub(crate) trait ItemAncestors {
Expand Down Expand Up @@ -1203,29 +1197,6 @@ impl HasTypeParamInArray for Item {
}
}

impl<T> HasFloat for T
where
T: Copy + Into<ItemId>,
{
fn has_float(&self, ctx: &BindgenContext) -> bool {
debug_assert!(
ctx.in_codegen_phase(),
"You're not supposed to call this yet"
);
ctx.lookup_has_float(*self)
}
}

impl HasFloat for Item {
fn has_float(&self, ctx: &BindgenContext) -> bool {
debug_assert!(
ctx.in_codegen_phase(),
"You're not supposed to call this yet"
);
ctx.lookup_has_float(self.id())
}
}

/// A set of items.
pub(crate) type ItemSet = BTreeSet<ItemId>;

Expand Down
Loading