Nightly compiler requiring "feature" attribute policy

Hi everyone, I have a few fn-like proc macros that compile fine on the latest stable (1.45.2), but on nightly, they require feature(proc_macro_hygiene) attribute. I understand it is still an open issue:

but I wonder whether this is intended (on nightly, a feature attribute is required on everything, regardless of whether some of it compiles on stable, until it's fully implemented on stable) or not (on nightly, a feature attribute should only be required if that code doesn't compile on stable, but shouldn't be required if it does, even if stable only has a partial implementation of that feature). What is the compiler "policy" in this regard?

That sounds wrong. You might be using an old installation of nightly, which is older than 1.45. Could you confirm that after upgrading to the most recent nightly the same code that compiles with 1.45.2 also compiles with nightly?

Oh, yes, sorry for a false alarm -- the nightly used on CI where I detected this was a bit older.

2 Likes