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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user