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.
This commit is contained in:
Emilio Cobos Álvarez
2021-02-26 20:05:53 +01:00
parent 7312b997be
commit 1903686f9e
+1 -2
View File
@@ -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) {