This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Activity
14e59bb317
rust
/
tests
/
ui
/
parser
/
match-arrows-block-then-binop.rs
8 lines
116 B
Rust
Raw
Normal View
History
Unescape
Escape
syntax: Allow any block-like expr to be used as alt arm w/o comma separator
2012-08-01 16:16:53 -07:00
fn
main
(
)
{
Identify when a stmt could have been parsed as an expr There are some expressions that can be parsed as a statement without a trailing semicolon depending on the context, which can lead to confusing errors due to the same looking code being accepted in some places and not others. Identify these cases and suggest enclosing in parenthesis making the parse non-ambiguous without changing the accepted grammar.
2019-04-22 19:37:23 -07:00
let
_
=
match
0
{
syntax: Allow any block-like expr to be used as alt arm w/o comma separator
2012-08-01 16:16:53 -07:00
0
=
>
{
Identify when a stmt could have been parsed as an expr There are some expressions that can be parsed as a statement without a trailing semicolon depending on the context, which can lead to confusing errors due to the same looking code being accepted in some places and not others. Identify these cases and suggest enclosing in parenthesis making the parse non-ambiguous without changing the accepted grammar.
2019-04-22 19:37:23 -07:00
0
syntax: Make `is_path_start` precise and improve some error messages about unexpected tokens
2016-04-21 02:03:29 +03:00
}
+
5
//~ ERROR expected pattern, found `+`
Identify when a stmt could have been parsed as an expr There are some expressions that can be parsed as a statement without a trailing semicolon depending on the context, which can lead to confusing errors due to the same looking code being accepted in some places and not others. Identify these cases and suggest enclosing in parenthesis making the parse non-ambiguous without changing the accepted grammar.
2019-04-22 19:37:23 -07:00
}
;
librustc: Replace `impl Type : Trait` with `impl Trait for Type`. rs=implflipping
2013-02-14 11:47:00 -08:00
}
Copy permalink