Commit 9abaf017 authored by Josh Chase's avatar Josh Chase Committed by Ryan Hunt

Don't rename union generic type parameters

parent 5f85ed5f
......@@ -107,7 +107,13 @@ impl Item for Union {
fn rename_for_config(&mut self, config: &Config) {
config.export.rename(&mut self.name);
for &mut (_, ref mut ty, _) in &mut self.fields {
ty.rename_for_config(config);
let generic_parameter = match ty.get_root_path() {
Some(ref p) => self.generic_params.contains(p),
None => false,
};
if !generic_parameter {
ty.rename_for_config(config);
}
}
let rules = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment