diff options
| author | csmoe <csmoe@msn.com> | 2020-01-15 15:13:51 +0800 |
|---|---|---|
| committer | csmoe <csmoe@msn.com> | 2020-01-15 15:13:51 +0800 |
| commit | 4eb47ded54610300c54291aee74d5585a711e75b (patch) | |
| tree | 125192603ec4ca75a6f52754265ef5168783cae9 /src/librustc/ty | |
| parent | 5ad8b9e3948fa05df0b9c2a6c71146c3af10cbc8 (diff) | |
| download | rust-4eb47ded54610300c54291aee74d5585a711e75b.tar.gz rust-4eb47ded54610300c54291aee74d5585a711e75b.zip | |
wrap expr id into GeneratorInteriorTypeCause
Diffstat (limited to 'src/librustc/ty')
| -rw-r--r-- | src/librustc/ty/context.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index d64e049c47b..ef776c88a8f 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -315,8 +315,7 @@ pub struct ResolvedOpaqueTy<'tcx> { /// /// Here, we would store the type `T`, the span of the value `x`, and the "scope-span" for /// the scope that contains `x`. -#[derive(RustcEncodable, RustcDecodable, Clone, Debug, Eq, Hash, PartialEq)] -#[derive(HashStable, TypeFoldable)] +#[derive(RustcEncodable, RustcDecodable, Clone, Debug, Eq, Hash, PartialEq, HashStable)] pub struct GeneratorInteriorTypeCause<'tcx> { /// Type of the captured binding. pub ty: Ty<'tcx>, @@ -324,6 +323,8 @@ pub struct GeneratorInteriorTypeCause<'tcx> { pub span: Span, /// Span of the scope of the captured binding. pub scope_span: Option<Span>, + /// Expr which the type evaluated from. + pub expr: Option<hir::HirId>, } #[derive(RustcEncodable, RustcDecodable, Debug)] @@ -438,7 +439,7 @@ pub struct TypeckTables<'tcx> { /// Stores the type, expression, span and optional scope span of all types /// that are live across the yield of this generator (if a generator). - pub generator_interior_types: Vec<(GeneratorInteriorTypeCause<'tcx>, Option<hir::HirId>)>, + pub generator_interior_types: Vec<GeneratorInteriorTypeCause<'tcx>>, } impl<'tcx> TypeckTables<'tcx> { |
