Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
f0bc76ac41a0a832c9ee621e31aaf1f515d3d6a5
rust/tests/ui/parser/issues/issue-60075.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
230 B
Rust
Raw Normal View History

Fix fn front matter parsing ICE from invalid code. This commit fixes an "unreachable code" ICE that results from parsing invalid code where the compiler is expecting the next trait item declaration in the middle of the previous trait item due to extra closing braces.
2019-04-20 11:31:38 +01:00
fn main() {}
trait T {
fn qux() -> Option<usize> {
let _ = if true {
});
parse: use `parse_item_common` in `parse_assoc_item_`.
2020-02-22 08:16:39 +01:00
//~^ ERROR non-item in item list
//~| ERROR mismatched closing delimiter: `)`
//~| ERROR expected one of `.`, `;`
Fix fn front matter parsing ICE from invalid code. This commit fixes an "unreachable code" ICE that results from parsing invalid code where the compiler is expecting the next trait item declaration in the middle of the previous trait item due to extra closing braces.
2019-04-20 11:31:38 +01:00
Some(4)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3355ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API