Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd (limited) CTFE #322
Comments
nrc
added
the
postponed
label
Sep 25, 2014
japaric
referenced this issue
Oct 14, 2014
Closed
Implement compile time function evaluation (CTFE) #11621
nrc
added
the
T-lang
label
May 15, 2015
This comment has been minimized.
This comment has been minimized.
|
Can we revisit this discussion now that the 1.0 launch craze has passed? |
This comment has been minimized.
This comment has been minimized.
|
This seems like it's covered by the const fn work? |
This comment has been minimized.
This comment has been minimized.
|
@sfackler Yeah, but |
This comment has been minimized.
This comment has been minimized.
|
Moreover the functions mentioned in #253 ( |
Protagores
referenced this issue
Jun 29, 2016
Closed
Conversion traits should emphasize their intended use and limitations #29701
Stebalien
referenced this issue
Nov 23, 2016
Closed
If expressions not evaluated for constants #37948
This comment has been minimized.
This comment has been minimized.
|
I was quite surprised that the following code does not compile: const CONDITION: bool = true;
const RESULT: u8 = if CONDITION { 1 } else { 0 };
I thought so too, but this doesn't compile: #![feature(const_fn)]
pub struct BitField (u8, u8);
impl BitField
{
const fn get_ms_bit_index(&self) -> u8 {
if self.0 > self.1 { self.0 } else { self.1 }
}
} |
This comment has been minimized.
This comment has been minimized.
|
Its in progress work. See the “postponed” label on the right hand side. |
This comment has been minimized.
This comment has been minimized.
|
@JinShil
|
This comment has been minimized.
This comment has been minimized.
|
The lack of |
This comment has been minimized.
This comment has been minimized.
|
If we allow |
This comment has been minimized.
This comment has been minimized.
kevincox
commented
Nov 26, 2016
|
Both if and match sound reasonable to me. |
This comment has been minimized.
This comment has been minimized.
|
Does anyone know what the status of conditionals within |
This comment has been minimized.
This comment has been minimized.
BenWiederhake
commented
Jun 25, 2017
|
Found this RFC after creating rust-lang/rust#42906 . What can I do to help? What's the next step? |
This comment has been minimized.
This comment has been minimized.
Ongy
referenced this issue
Aug 9, 2017
Open
Proposal: Merge efforts with config-rs (config on crates.io) #1
Kixunil
referenced this issue
Sep 14, 2017
Closed
'rustc' panicked at 'Box<Any>', when const expr evaluation panics #44578
spearman
referenced this issue
Sep 15, 2017
Open
Assert size_of type parameter greater than zero #16
dhardy
referenced this issue
Dec 14, 2017
Merged
Select "SimpleRand" over generic "Rand" for backwards compatibility #71
This comment has been minimized.
This comment has been minimized.
|
MIRI is merged into rustc and is will be used for all const evaluation soon (rust-lang/rust#46882), and |
nrc commentedSep 25, 2014
See #253 for a limited form of CTFE. We can use this issue to track a more complete form too.