]> git.lizzy.rs Git - rust.git/commit
Don't drop DiagnosticBuilder if parsing fails
authorJonathan Goodman <goodmanjonathan@sbcglobal.net>
Sun, 14 Jul 2019 00:34:06 +0000 (19:34 -0500)
committerJonathan Goodman <goodmanjonathan@sbcglobal.net>
Sun, 14 Jul 2019 00:46:13 +0000 (19:46 -0500)
commit7111328556e0580f1323cde3d5193eb8d2767693
treec425dee1a7ec6f9f910b37d3b579e9d381774696
parent69656fa4cbafc378fd63f9186d93b0df3cdd9320
Don't drop DiagnosticBuilder if parsing fails

If the explicitly given type of a `self` parameter fails to parse correctly,
we need to propagate the error rather than dropping it and causing an ICE.

Fixes #62660.
src/libsyntax/parse/parser.rs
src/test/ui/parser/issue-62660.rs [new file with mode: 0644]
src/test/ui/parser/issue-62660.stderr [new file with mode: 0644]