summaryrefslogtreecommitdiff
path: root/bindgen/ir
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen/ir')
-rw-r--r--bindgen/ir/analysis/template_params.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/bindgen/ir/analysis/template_params.rs b/bindgen/ir/analysis/template_params.rs
index e88b774d..f4f0c59d 100644
--- a/bindgen/ir/analysis/template_params.rs
+++ b/bindgen/ir/analysis/template_params.rs
@@ -424,8 +424,7 @@ impl<'ctx> MonotoneFramework for UsedTemplateParameters<'ctx> {
// generic template parameters are used.
let item_kind =
ctx.resolve_item(item).as_type().map(|ty| ty.kind());
- if let Some(&TypeKind::TemplateInstantiation(ref inst)) = item_kind
- {
+ if let Some(TypeKind::TemplateInstantiation(inst)) = item_kind {
let decl = ctx.resolve_type(inst.template_definition());
let args = inst.template_arguments();
@@ -540,7 +539,7 @@ impl<'ctx> MonotoneFramework for UsedTemplateParameters<'ctx> {
}
// Template instantiations only use their template arguments if the
// template definition uses the corresponding template parameter.
- Some(&TypeKind::TemplateInstantiation(ref inst)) => {
+ Some(TypeKind::TemplateInstantiation(inst)) => {
if self
.allowlisted_items
.contains(&inst.template_definition().into())