about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorDavid Wood <david@davidtw.co>2019-05-09 19:14:39 +0100
committerDavid Wood <david@davidtw.co>2019-05-09 19:14:39 +0100
commitd5e04067cb23df91070fea1a01aa6417afa714ed (patch)
tree3fb48e6c62318b28b9fa1e8556396821f907b08b /src/libsyntax
parentdcd3cf70177f5af115d4799fc7fff836b3bcf649 (diff)
downloadrust-d5e04067cb23df91070fea1a01aa6417afa714ed.tar.gz
rust-d5e04067cb23df91070fea1a01aa6417afa714ed.zip
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.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index ab4de4891a5..5fd6276a237 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -8730,6 +8730,10 @@ impl<'a> Parser<'a> {
     /// The arguments of the function are replaced in HIR lowering with the arguments created by
     /// this function and the statements created here are inserted at the top of the closure body.
     fn construct_async_arguments(&mut self, asyncness: &mut Spanned<IsAsync>, decl: &mut FnDecl) {
+        // FIXME(davidtwco): This function should really live in the HIR lowering but because
+        // the types constructed here need to be used in parts of resolve so that the correct
+        // locals are considered upvars, it is currently easier for it to live here in the parser,
+        // where it can be constructed once.
         if let IsAsync::Async { ref mut arguments, .. } = asyncness.node {
             for (index, input) in decl.inputs.iter_mut().enumerate() {
                 let id = ast::DUMMY_NODE_ID;