Skip to content

Framework for beta features, and $Xmeta default

Ian Jackson requested to merge beta into main

This branch has two things in it:

  1. Provide a beta cargo feature and beta_deftly template option, to provide us with a way to have a feature but not make it instantly stable (which will be especially relevant after 1.x)
  2. Provide ${Xmeta as TY, default DEFAULT}, prompted by #40 (comment 3045214)

@nickm, I'd appreciate your opinions about the new APIs. Probably, it would be sufficient to read the new docs, although of course you're welcome to read the code too.

I think the meta default is uncontroversial (although feel free to have opinions about the way I resolved the edge cases, etc.)

I think I like the way the new beta features arrangements came out, but I'd really like a review of it before merging it. Some choices I made:

  • I went for a two-stage appraoch (cargo feature + template option) because cargo features being additive might otherwise mean you could be using beta features accidentally (because some other crate asked for them) and not know it.
  • "beta" seems more encouraging than "unstable" and I chose to make at least some small semver guarantees
  • I chose beta_deftly as the template option name since we wouldn't want someone seeing it in a define_d_d! to think it had something to do with Beta Rust.

Merge request reports

Loading