This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Issues
Pull requests
Activity
400e8e5dc8
rust
/
tests
/
ui
/
pub
/
pub-ident-struct-3.rs
5 lines
73 B
Rust
Raw
Normal View
History
Unescape
Escape
Do not attemt to continue parsing after `pub ident` Try to identify the following code in order to provide better diagnostics, but return the error to bail out early during the parse.
2017-11-21 08:03:02 -08:00
pub
S
(
)
;
Fix condition for "missing `struct`" diagnostic on tuple structs The check previously matched this, and suggested adding a missing `struct`: pub Foo(...): It was probably intended to match this instead (semicolon instead of colon): pub Foo(...);
2022-10-06 18:35:53 +02:00
//~^ ERROR missing `struct` for struct definition
Do not rewind parser and ignore following blocks When encountering `pub ident`, attempt to identify the code that comes afterwards, wether it is a brace block (assume it is a struct), a paren list followed by a colon (assume struct) or a paren list followed by a block (assume a fn). Consume those blocks to avoid any further parser errors and return a `Placeholder` item in order to allow the parser to continue. In the case of unenclosed blocks, the behavior is the same as it is currently: no further errors are processed.
2017-11-21 06:49:15 -08:00
Do not attemt to continue parsing after `pub ident` Try to identify the following code in order to provide better diagnostics, but return the error to bail out early during the parse.
2017-11-21 08:03:02 -08:00
fn
main
(
)
{
}
Reference in a new issue
Copy permalink