-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Description
I am using diesel and I have to use this thing:
#![allow(proc_macro_derive_resolution_fallback)]However, it is allowed to use it only in rustc >= 1.29 so it breaks compatibility if I write it so. I'd like to write it as the following:
#![cfg_attr(
rustc_version_higher_than(1, 28),
allow(proc_macro_derive_resolution_fallback)
)]This requires adding such a attribute (rustc_version_higher_than) with corresponding checks. If anyone agreed, I'd do it myself, just point me where I can see for such a code as an example and where I can put it.
P.S. For checking is it less (if anyone needs that someday) it would be good just to use not:
#![cfg_attr(
not(rustc_version_higher_than(1, 28)),
allow(proc_macro_derive_resolution_fallback)
)]Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team