aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-substitution-mapper.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/gcc/rust/typecheck/rust-substitution-mapper.h b/gcc/rust/typecheck/rust-substitution-mapper.h
index 5f17816..e12432e 100644
--- a/gcc/rust/typecheck/rust-substitution-mapper.h
+++ b/gcc/rust/typecheck/rust-substitution-mapper.h
@@ -232,19 +232,22 @@ public:
}
// nothing to do for these
- void visit (TyTy::InferType &) override { gcc_unreachable (); }
- void visit (TyTy::FnPtr &) override { gcc_unreachable (); }
- void visit (TyTy::BoolType &) override { gcc_unreachable (); }
- void visit (TyTy::IntType &) override { gcc_unreachable (); }
- void visit (TyTy::UintType &) override { gcc_unreachable (); }
- void visit (TyTy::FloatType &) override { gcc_unreachable (); }
- void visit (TyTy::USizeType &) override { gcc_unreachable (); }
- void visit (TyTy::ISizeType &) override { gcc_unreachable (); }
- void visit (TyTy::ErrorType &) override { gcc_unreachable (); }
- void visit (TyTy::CharType &) override { gcc_unreachable (); }
- void visit (TyTy::StrType &) override { gcc_unreachable (); }
- void visit (TyTy::NeverType &) override { gcc_unreachable (); }
- void visit (TyTy::DynamicObjectType &) override { gcc_unreachable (); }
+ void visit (TyTy::InferType &type) override { resolved = type.clone (); }
+ void visit (TyTy::FnPtr &type) override { resolved = type.clone (); }
+ void visit (TyTy::BoolType &type) override { resolved = type.clone (); }
+ void visit (TyTy::IntType &type) override { resolved = type.clone (); }
+ void visit (TyTy::UintType &type) override { resolved = type.clone (); }
+ void visit (TyTy::FloatType &type) override { resolved = type.clone (); }
+ void visit (TyTy::USizeType &type) override { resolved = type.clone (); }
+ void visit (TyTy::ISizeType &type) override { resolved = type.clone (); }
+ void visit (TyTy::ErrorType &type) override { resolved = type.clone (); }
+ void visit (TyTy::CharType &type) override { resolved = type.clone (); }
+ void visit (TyTy::StrType &type) override { resolved = type.clone (); }
+ void visit (TyTy::NeverType &type) override { resolved = type.clone (); }
+ void visit (TyTy::DynamicObjectType &type) override
+ {
+ resolved = type.clone ();
+ }
private:
SubstMapperInternal (HirId ref, TyTy::SubstitutionArgumentMappings &mappings)