This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2025-04-29 11:37:39 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
14e59bb317
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 16:03:02 +00: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 16:35:53 +00: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 14:49:15 +00: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 16:03:02 +00:00
fn
main
(
)
{
}
Reference in New Issue
Copy Permalink