Skip to content

Commit 3f765c1

Browse files
committed
feat(future): Clippy lint to use since with cfg_alias
1 parent 79f50aa commit 3f765c1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

text/3857-cfg-version.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,3 +976,10 @@ There isn't a way to check if a `cfg` name is set, whether with or without value
976976
which would work like a `cfg` version of
977977
[`cfg_accessible`](https://dev-doc.rust-lang.org/stable/unstable-book/library-features/cfg-accessible.html)
978978
so long as the `cfg` is unconditionally set.
979+
980+
## Clippy lint: prefer using `cfg(since)` via `cfg_alias!`
981+
982+
Once we have this RFC and [RFC 3804](https://github.com/rust-lang/rfcs/pull/3804),
983+
we may want a restriction lint that would encourage people to use `cfg(since)` through `cfg_alias`
984+
so people work off of names in `cfg()` throughout their code base,
985+
rather than versions that may be duplicated and lack semantic meaning.

0 commit comments

Comments
 (0)