plex icon indicating copy to clipboard operation
plex copied to clipboard

warning: function 'reduce_11' is never used

Open maxrdz opened this issue 1 year ago • 2 comments

A certain production rule in my parser definition causes the whole parser definition to be marked under the "function 'reduce_11' is never used" rustc warning. Build code from this point in my project's git history to reproduce: 8fc9de55efef7ab242d38f29b0020880dbd8f8de. Parser source is at src/dcparser.rs

maxrdz avatar Sep 28 '23 01:09 maxrdz

I started writing some unit testing on my parser file and the warning does not show anymore, but I'll keep the issue open as it looks like a quirky bug to me.

maxrdz avatar Sep 28 '23 03:09 maxrdz

I'll try to take a look at your case later but I believe this indicates that there's some redundancy in your grammar, so I'd consider this more of a diagnostics bug. Probably we should emit an error instead.

goffrie avatar Sep 28 '23 08:09 goffrie