diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2016-07-22 18:56:22 +0300 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2016-08-12 06:43:34 +0300 |
| commit | ef11d4e3c7040bf7cbb351dac8317a7957471b3b (patch) | |
| tree | 163620cf8be4fda40f6e91281db5d64e501f7edf /src/librustc/ty/structural_impls.rs | |
| parent | f0baec691f9bfcfc70d6f35b1a86f7cf204a7d4f (diff) | |
| download | rust-ef11d4e3c7040bf7cbb351dac8317a7957471b3b.tar.gz rust-ef11d4e3c7040bf7cbb351dac8317a7957471b3b.zip | |
rustc: add TyAnon (impl Trait) to the typesystem.
Diffstat (limited to 'src/librustc/ty/structural_impls.rs')
| -rw-r--r-- | src/librustc/ty/structural_impls.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs index 16a54c20925..e542e8f237f 100644 --- a/src/librustc/ty/structural_impls.rs +++ b/src/librustc/ty/structural_impls.rs @@ -485,6 +485,7 @@ impl<'tcx> TypeFoldable<'tcx> for Ty<'tcx> { ty::TyStruct(did, substs) => ty::TyStruct(did, substs.fold_with(folder)), ty::TyClosure(did, substs) => ty::TyClosure(did, substs.fold_with(folder)), ty::TyProjection(ref data) => ty::TyProjection(data.fold_with(folder)), + ty::TyAnon(did, substs) => ty::TyAnon(did, substs.fold_with(folder)), ty::TyBool | ty::TyChar | ty::TyStr | ty::TyInt(_) | ty::TyUint(_) | ty::TyFloat(_) | ty::TyError | ty::TyInfer(_) | ty::TyParam(..) => self.sty.clone(), @@ -513,6 +514,7 @@ impl<'tcx> TypeFoldable<'tcx> for Ty<'tcx> { ty::TyStruct(_did, ref substs) => substs.visit_with(visitor), ty::TyClosure(_did, ref substs) => substs.visit_with(visitor), ty::TyProjection(ref data) => data.visit_with(visitor), + ty::TyAnon(_, ref substs) => substs.visit_with(visitor), ty::TyBool | ty::TyChar | ty::TyStr | ty::TyInt(_) | ty::TyUint(_) | ty::TyFloat(_) | ty::TyError | ty::TyInfer(_) | ty::TyParam(..) => false, |
