gccrs icon indicating copy to clipboard operation
gccrs copied to clipboard

no error on just a `$`

Open matthiaskrgr opened this issue 2 months ago • 1 comments

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? 🤔

matthiaskrgr avatar Sep 26 '26 18:09 matthiaskrgr

For the $ case:

It should obviously err saying

error: expected item, found '$'

wesley-lewis avatar Oct 18 '26 20:10 wesley-lewis