diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-01-04 02:19:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-04 02:19:46 +0100 |
| commit | 85277ff772f20293799b1f99f673e0b3f733b0b6 (patch) | |
| tree | efa474206ba03e3b18454e170c9fa96e422a86aa | |
| parent | a436293994b7ff8c15f515faf1aa42623769cf5d (diff) | |
| parent | 368ac73c11662dbb860db178dc170768078b282d (diff) | |
| download | rust-85277ff772f20293799b1f99f673e0b3f733b0b6.tar.gz rust-85277ff772f20293799b1f99f673e0b3f733b0b6.zip | |
Rollup merge of #67531 - RalfJung:tame-promotion, r=nikomatsakis
no longer promote non-pattern const functions This is trying to pack-pedal a bit on promotion feature creep, as proposed by @eddyb [here](https://github.com/rust-lang/const-eval/issues/19#issuecomment-472799062): possibly, a sane subset of `const fn` that we could promote are those that are just constructors -- the same subset that we might want to allow in pattern position at some point. So, this removes the `rustc_promotable` attribute from the three functions they identified that do not fit this pattern. The first step is to run crater to see if there is code in the wild that relies on this being promotable. r? @oli-obk
| -rw-r--r-- | src/libcore/time.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/libcore/time.rs b/src/libcore/time.rs index c1d405239f9..2ece2150e6b 100644 --- a/src/libcore/time.rs +++ b/src/libcore/time.rs @@ -172,7 +172,6 @@ impl Duration { /// ``` #[stable(feature = "duration", since = "1.3.0")] #[inline] - #[rustc_promotable] #[rustc_const_stable(feature = "duration_consts", since = "1.32.0")] pub const fn from_millis(millis: u64) -> Duration { Duration { @@ -195,7 +194,6 @@ impl Duration { /// ``` #[stable(feature = "duration_from_micros", since = "1.27.0")] #[inline] - #[rustc_promotable] #[rustc_const_stable(feature = "duration_consts", since = "1.32.0")] pub const fn from_micros(micros: u64) -> Duration { Duration { @@ -218,7 +216,6 @@ impl Duration { /// ``` #[stable(feature = "duration_extras", since = "1.27.0")] #[inline] - #[rustc_promotable] #[rustc_const_stable(feature = "duration_consts", since = "1.32.0")] pub const fn from_nanos(nanos: u64) -> Duration { Duration { |
