api-guidelines
api-guidelines copied to clipboard
Document that nightly features should be opt-in using a `--cfg` flag
This was discussed (a long time ago now) in https://github.com/rust-lang/api-guidelines/discussions/95. I tried to make this a simple summary of that discussion and not editorialize too much. I did add a note on just running rustc --version, since that's nearly always broken.
I chose intrinsics::[black_box, catch_unwind} as the examples because a) they already have stable versions, so there's no temptation to copy them out of the docs, and b) intrinsics are perma-unstable and we won't need to update them.