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
a63f35daeefc4ae89ba5b6bd0323d97bb0d050e6
rust/src/test/ui/issues/issue-60075.rs

11 lines
227 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 {
});
syntactically allow visibility on trait item & enum variant
2019-11-07 11:26:36 +01:00
//~^ ERROR expected one of `async`
Reduce ammount of errors given unclosed delimiter When in a file with a non-terminated item, catch the error and consume the block instead of trying to recover it more granularly in order to reduce the amount of unrelated errors that would be fixed after adding the missing closing brace. Also point out the possible location of the missing closing brace.
2019-10-25 18:30:02 -07:00
//~| ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `}`
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: 841ms Template: 3ms
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