You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I forgot a lone debug_assert!(); without any arguments given to the macro. This was in one of the modules of my code (not lib.rs). The consequences are quite painful:
The compilation fails with:
So the issue is that I expected an error message indicating the file where my wrong macro call was made and the line number. Instead I got this error message with no location information nor any reference to a macro. I had to comment/uncomment all my new modules/functions/lines to find my incorrect macro call.
I could reproduce the issue with assert!();, but not with format!(); the later gives a useful error message ([rustc] requires at least a format string argument). So this must affect only some macros.
The text was updated successfully, but these errors were encountered:
joIivier
changed the title
assert!(); without arguments breaks parser with unclear error message (no file name, line info)
assert!(); without arguments breaks compilation with unclear error message (no file name, line info)
Oct 31, 2018
I forgot a lone
debug_assert!();
without any arguments given to the macro. This was in one of the modules of my code (not lib.rs). The consequences are quite painful:The compilation fails with:
So the issue is that I expected an error message indicating the file where my wrong macro call was made and the line number. Instead I got this error message with no location information nor any reference to a macro. I had to comment/uncomment all my new modules/functions/lines to find my incorrect macro call.
I could reproduce the issue with
assert!();
, but not withformat!();
the later gives a useful error message([rustc] requires at least a format string argument)
. So this must affect only some macros.Meta
rustc --version --verbose rustc 1.30.0 (da5f414c2 2018-10-24) binary: rustc commit-hash: da5f414c2c0bfe5198934493f04c676e2b23ff2e commit-date: 2018-10-24 host: x86_64-unknown-linux-gnu release: 1.30.0 LLVM version: 8.0
The text was updated successfully, but these errors were encountered: