Skip to content

Commit d5e0406

Browse files
committed
Add FIXME about construct_async_arguments.
This is unrelated to the rest of this PR but it made sense to add a FIXME explaining that the function shouldn't really be in the parser.
1 parent dcd3cf7 commit d5e0406

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libsyntax/parse/parser.rs

+4
Original file line numberDiff line numberDiff line change
@@ -8730,6 +8730,10 @@ impl<'a> Parser<'a> {
87308730
/// The arguments of the function are replaced in HIR lowering with the arguments created by
87318731
/// this function and the statements created here are inserted at the top of the closure body.
87328732
fn construct_async_arguments(&mut self, asyncness: &mut Spanned<IsAsync>, decl: &mut FnDecl) {
8733+
// FIXME(davidtwco): This function should really live in the HIR lowering but because
8734+
// the types constructed here need to be used in parts of resolve so that the correct
8735+
// locals are considered upvars, it is currently easier for it to live here in the parser,
8736+
// where it can be constructed once.
87338737
if let IsAsync::Async { ref mut arguments, .. } = asyncness.node {
87348738
for (index, input) in decl.inputs.iter_mut().enumerate() {
87358739
let id = ast::DUMMY_NODE_ID;

0 commit comments

Comments
 (0)