From 1903686f9eb09f587885d579f3e14c990e799938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 26 Feb 2021 20:05:53 +0100 Subject: [PATCH] ty: simplify nested types before trying to simplify ourselves. I don't think this changes behavior right now but it is conceptually the right thing to do. --- src/bindgen/ir/ty.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bindgen/ir/ty.rs b/src/bindgen/ir/ty.rs index 88a294f..4fc4c57 100644 --- a/src/bindgen/ir/ty.rs +++ b/src/bindgen/ir/ty.rs @@ -638,11 +638,10 @@ impl Type { } pub fn simplify_standard_types(&mut self, config: &Config) { + self.visit_types(|ty| ty.simplify_standard_types(config)); if let Some(ty) = self.simplified_type(config) { *self = ty; } - - self.visit_types(|ty| ty.simplify_standard_types(config)) } pub fn replace_self_with(&mut self, self_ty: &Path) {