gccrs
gccrs copied to clipboard
no error on just a `$`
crab1 -frust-incomplete-and-experimental-compiler-do-not-use "-frust-crate-attr=no_core" "-frust-crate-attr=feature(no_core)" code.rs
if a file just contains $ / dollar sign , rustc will print an error
error: expected item, found `$`
--> o.rs:1:1
|
1 | $
| ^ expected item
|
= note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
error: aborting due to 1 previous error
but crab1 will not show any diagnostics and exit with 0 which is surprising.
It also looks like it does not matter for crab1 what comes behind the $, it will just stop parsing? 🤔
For the $ case:
It should obviously err saying
error: expected item, found '$'