Enabling unstable features only for parts of a crate?


Using unstable features when using nightly is easy enough. But that feature is then enabled for the whole crate.

I would like to enable non-lexical lifetimes. But only for a small part of the code, as there are cases in which using it will lead to ICEs atm.

However I’m not sure that:

  1. Enabling unstable features can be done at all atm for part of a crate, e.g. using regular #[] attributes and
  2. Even if it can, would such a thing even be possible for something as invasive as non-lexical lifetimes?


Currently, you can’t do that, and I would see that as an extreme edge case. If you absolutely must, you can factor the parts out into helper crate and activate NLL there.


closed #3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.