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 limited CTFE #253

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
8 participants
@mahkoh
Copy link
Contributor

mahkoh commented Sep 20, 2014

Implement compile time evaluation of a limited set of compiler-internal functions:

  • size_of
  • min_align_of
  • pref_align_of

Rendered

Old rendered link (not working)

EDIT: Fixed rendered link / Centril

@SiegeLord

This comment has been minimized.

Copy link

SiegeLord commented Sep 20, 2014

I've always thought that it'd be easiest to make all of these be associated statics of the Sized kind.

the detailed description above resolves to `core::mem::size_of` because some
programs might wish to avoid even `libcore`.
Thus, this feature should live behind a feature gate.

This comment has been minimized.

@steveklabnik

steveklabnik Sep 20, 2014

Member

All new features are going to end up landing behind a feature gate at first, so this part isn't really relevant.

This comment has been minimized.

@mahkoh

mahkoh Sep 20, 2014

Author Contributor

I meant that this should be behind a feature gate until real CTFE has been implemented (if ever). Real CTFE would immediately replace this, but because this is not 100% compatible you would have to continue to maintain this if it's not marked unstable in some way.

@Ericson2314

This comment has been minimized.

Copy link
Contributor

Ericson2314 commented Sep 21, 2014

I've always thought that it'd be easiest to make all of these be associated statics of the Sized kind.

+1. This seems like an excellent workaround until we get "real CTFE".

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Sep 25, 2014

We discussed this in the triage meeting today, and while CTFE of some kind is something we are interested in, it is backwards compatible and not high enough priority to block 1.0. Therefore we are postponing discussion on this until post-1.0. Thanks for the RFC!

@nrc nrc closed this Sep 25, 2014

@nrc nrc added the postponed label Sep 25, 2014

@nrc nrc referenced this pull request Sep 25, 2014

Closed

Add (limited) CTFE #322

withoutboats pushed a commit to withoutboats/rfcs that referenced this pull request Jan 15, 2017

@fschutt

This comment has been minimized.

Copy link

fschutt commented Dec 13, 2017

The "rendered" link in the first comment is broken. Just wanted to report that.

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Dec 14, 2017

@fschutt Thanks; Fixed =)

@petrochenkov petrochenkov removed the postponed label Feb 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.