From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id BFFBF3857807 for ; Mon, 12 Jul 2021 08:33:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BFFBF3857807 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x18.wildebeest.org [172.31.17.154]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 086D2300064F; Mon, 12 Jul 2021 10:32:59 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 45D0A2E808D7; Mon, 12 Jul 2021 10:32:49 +0200 (CEST) Date: Mon, 12 Jul 2021 10:32:49 +0200 From: Mark Wielaard To: Philip Herron Cc: gcc-rust@gcc.gnu.org Subject: Re: [PATCH] Handle doc comment strings in lexer and parser Message-ID: References: <20210711201018.389798-1-mark@klomp.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-rust@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: gcc-rust mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2021 08:33:03 -0000 Hi Philip, On Mon, Jul 12, 2021 at 09:09:09AM +0100, Philip Herron wrote: > This patch looks good to me. When I tried to apply it to merge it I got > the following: > > ``` > $ git am  '[PATCH] Handle doc comment strings in lexer and parser.eml' > Applying: Handle doc comment strings in lexer and parser > error: corrupt patch at line 531 > Patch failed at 0001 Handle doc comment strings in lexer and parser > hint: Use 'git am --show-current-patch' to see the failed patch > When you have resolved this problem, run "git am --continue". > If you prefer to skip this patch, run "git am --skip" instead. > To restore the original branch and stop patching, run "git am --abort". > ``` > > Not sure if I have done something wrong, have you any pointers? Looks like that is one of the IsolatedCR tests (a bare \r not at the end of a line followed by \n in a doc comment string). I assume some mailer ate it and/or added a \n somehwere to "correct" it. Would you be able to pull directly from my git repo? The following changes since commit 4560f469ee33536cec6af0f8e5816ff97de60de0: Merge #551 (2021-07-10 21:02:06 +0000) are available in the Git repository at: https://code.wildebeest.org/git/user/mjw/gccrs doc-comments for you to fetch changes up to e1e14958a90397a1ed6ab7236dc5a6f1c2f22505: Handle doc comment strings in lexer and parser (2021-07-11 21:09:21 +0200) ---------------------------------------------------------------- Mark Wielaard (1): Handle doc comment strings in lexer and parser gcc/rust/ast/rust-ast.h | 2 + gcc/rust/lex/rust-lex.cc | 214 +++++++++++++++++++-- gcc/rust/lex/rust-token.h | 25 ++- gcc/rust/parse/rust-parse-impl.h | 60 +++++- gcc/rust/parse/rust-parse.h | 1 + gcc/testsuite/rust/compile/bad_inner_doc.rs | 15 ++ .../rust/compile/doc_isolated_cr_block_comment.rs | 3 + .../compile/doc_isolated_cr_inner_block_comment.rs | 5 + .../compile/doc_isolated_cr_inner_line_comment.rs | 5 + .../rust/compile/doc_isolated_cr_line_comment.rs | 3 + .../compile/torture/all_doc_comment_line_blocks.rs | 47 +++++ .../torture/all_doc_comment_line_blocks_crlf.rs | 47 +++++ .../compile/torture/isolated_cr_block_comment.rs | 2 + .../compile/torture/isolated_cr_line_comment.rs | 2 + 14 files changed, 401 insertions(+), 30 deletions(-) create mode 100644 gcc/testsuite/rust/compile/bad_inner_doc.rs create mode 100644 gcc/testsuite/rust/compile/doc_isolated_cr_block_comment.rs create mode 100644 gcc/testsuite/rust/compile/doc_isolated_cr_inner_block_comment.rs create mode 100644 gcc/testsuite/rust/compile/doc_isolated_cr_inner_line_comment.rs create mode 100644 gcc/testsuite/rust/compile/doc_isolated_cr_line_comment.rs create mode 100644 gcc/testsuite/rust/compile/torture/all_doc_comment_line_blocks.rs create mode 100644 gcc/testsuite/rust/compile/torture/all_doc_comment_line_blocks_crlf.rs create mode 100644 gcc/testsuite/rust/compile/torture/isolated_cr_block_comment.rs create mode 100644 gcc/testsuite/rust/compile/torture/isolated_cr_line_comment.rs