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

Generate code based on version rather than cfg #15

Closed
taiki-e opened this issue Jun 8, 2020 · 4 comments · Fixed by #17
Closed

Generate code based on version rather than cfg #15

taiki-e opened this issue Jun 8, 2020 · 4 comments · Fixed by #17
Labels
C-enhancement Category: A new feature or an improvement for an existing one

Comments

@taiki-e
Copy link
Owner

taiki-e commented Jun 8, 2020

something like:

#[const_fn(1.36)]
const fn foo() {
    // ...
}
@jhpratt
Copy link

jhpratt commented Aug 23, 2020

Even more powerful, with the use of autocfg, it may be possible to automatically determine if the function can be const. This would allow use on nightlies and betas similarly.

@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label Aug 24, 2020
@taiki-e
Copy link
Owner Author

taiki-e commented Aug 24, 2020

it may be possible to automatically determine if the function can be const.

Interesting, but does it actually seem like you have to compile the whole crate per const_fn attribute (as the function may depend on other items in the crate)?

@jhpratt
Copy link

jhpratt commented Aug 24, 2020

Yeah, that would likely be the case now that you bring it up. Disregard 😄

@bors bors bot closed this as completed in 7d29667 Aug 25, 2020
@taiki-e
Copy link
Owner Author

taiki-e commented Aug 25, 2020

Published 0.4.0 which fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A new feature or an improvement for an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants