Surprising missing stability attribute error #84935
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-bug
Category: This is a bug.
On master (as of 716394d) I can currently successfully compile stage1 std by running
./x.py build --stage 1
.Before #81837 merged, applying the following patch would still allow me to successfully compile stage1 std:
After #81837, which added a non-
pub
const
to that module, applying the above patch gives me the following error:If I revert #81837 the error goes away.
This is surprising - I wouldn't expect the presence of an unrelated, but properly marked unstable, macro in a module to change whether a
const
needs to be marked stable. I'm not sure what's wrong here - maybe theconst
does need a stability attribute and a bug means that wasn't flagged, or maybe the lint checking for missing stability attributes is getting tripped up somehow, but something is wrong...This reliably reproduces whether the added module is inline or a separate file. It does not reproduce if the macro isn't present in the module (e.g. it doesn't reproduce for an empty module).
The text was updated successfully, but these errors were encountered: