Skip to content
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
21 changes: 1 addition & 20 deletions engine/src/conversion/analysis/fun/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::{
apivec::ApiVec,
convert_error::{ConvertErrorWithContext, ErrorContext, ErrorContextType},
error_reporter::{convert_apis, report_any_error},
type_helpers::{type_has_unused_template_param, type_is_reference, unwrap_has_opaque},
type_helpers::{type_is_reference, unwrap_has_opaque},
CppEffectiveName, CppOriginalName,
},
known_types::known_types,
Expand Down Expand Up @@ -1135,10 +1135,6 @@ impl<'a> FnAnalyzer<'a> {
Ok(_) => panic!("No error in the error"),
Err(problem) => set_ignore_reason(problem),
}
} else if any_type_has_unused_template_param(&fun.inputs, &fun.output) {
// This indicates that bindgen essentially flaked out because templates
// were too complex.
set_ignore_reason(ConvertErrorFromCpp::UnusedTemplateParam)
} else if matches!(
fun.special_member,
Some(SpecialMemberKind::AssignmentOperator)
Expand Down Expand Up @@ -2202,21 +2198,6 @@ impl<'a> FnAnalyzer<'a> {
}
}

fn any_type_has_unused_template_param(
inputs: &Punctuated<FnArg, Comma>,
output: &crate::minisyn::ReturnType,
) -> bool {
if let ReturnType::Type(_, ty) = &output.0 {
if type_has_unused_template_param(ty.as_ref()) {
return true;
}
}
inputs.iter().any(|input| match &input.0 {
syn::FnArg::Receiver(_) => false,
syn::FnArg::Typed(PatType { ty, .. }) => type_has_unused_template_param(ty.as_ref()),
})
}

fn special_member_to_string(special_member: SpecialMemberKind) -> &'static str {
match special_member {
SpecialMemberKind::DefaultConstructor => "default constructor",
Expand Down
4 changes: 0 additions & 4 deletions engine/src/conversion/type_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ pub(crate) fn unwrap_reference(ty: &TypePath, search_for_rvalue: bool) -> Option
}
}

pub(crate) fn type_has_unused_template_param(ty: &syn::Type) -> bool {
matches_bindgen_marker(ty, "__bindgen_marker_UnusedTemplateParam")
}

pub(crate) fn unwrap_has_unused_template_param(ty: &TypePath) -> Option<&syn::Type> {
unwrap_bindgen_marker(ty, "__bindgen_marker_UnusedTemplateParam")
}
Expand Down
2 changes: 2 additions & 0 deletions integration-tests/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5990,6 +5990,8 @@ fn test_error_generated_for_static_data() {
}

#[test]
#[cfg_attr(skip_windows_gnu_failing_tests, ignore)]
#[cfg_attr(skip_windows_msvc_failing_tests, ignore)]
fn test_error_generated_for_array_dependent_function() {
let hdr = indoc! {"
#include <cstdint>
Expand Down
Loading