-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Add compile_warning! builtin macro #57751
Copy link
Copy link
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-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
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-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
compile_error! was added in 1.20, about a year and a half ago. This has proven to be a useful feature to me, however I was confused about the absence of a warning equivalent. I can think of times where it may be useful to warn instead of error, eg expecting certain cfgs to be enabled when compiling, or for macros to use for weird behavior.
I'm not sure if this is a large enough request to where it would warrant an RFC, but I don't think so?