Introduce LocalSource into the AST.

This will be used to keep track of the origin of a local in the AST. In
particular, it will be used by `async fn` lowering for the locals in
`let <pat>: <ty> = __arg0;` statements.
This commit is contained in:
David Wood
2019-03-12 16:53:33 +01:00
parent 8b57be1bb3
commit 41c6bb1096
9 changed files with 46 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ use crate::ast::{GenericParam, GenericParamKind};
use crate::ast::GenericArg;
use crate::ast::{Ident, ImplItem, IsAsync, IsAuto, Item, ItemKind};
use crate::ast::{Label, Lifetime, Lit, LitKind};
use crate::ast::Local;
use crate::ast::{Local, LocalSource};
use crate::ast::MacStmtStyle;
use crate::ast::{Mac, Mac_, MacDelimiter};
use crate::ast::{MutTy, Mutability};
@@ -5029,6 +5029,7 @@ impl<'a> Parser<'a> {
id: ast::DUMMY_NODE_ID,
span: lo.to(hi),
attrs,
source: LocalSource::Normal,
}))
}