Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to conditionally compile things when a config item is _not_ present #1724

Closed
brson opened this issue Feb 1, 2012 · 2 comments
Closed
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Feb 1, 2012

A number of times I have wanted to use one function in one configuration in another in all other configurations. There's just no way to express this currently. A simple way to implement it would be with a #[notcfg(...)] attribute, which would just do the opposite of #[cfg(...)].

@graydon
Copy link
Contributor

graydon commented Feb 15, 2012

Agreed. Have stubbed my toe on this a couple times now.

@graydon
Copy link
Contributor

graydon commented Apr 5, 2012

Subsumed in #2119, closing as duplicate.

@graydon graydon closed this as completed Apr 5, 2012
flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 25, 2021
Fix `new_ret_no_self` false positive

fixes: rust-lang#1724

changelog: Fix false positive with `new_ret_no_self` when returning `Self` with different generic arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants