Skip to content

Commit bc783d2

Browse files
committed
Unpromote unstable const fns
1 parent 5987521 commit bc783d2

File tree

5 files changed

+2
-11
lines changed

5 files changed

+2
-11
lines changed

coresimd/ppsv/api/masks.rs

-4
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,25 @@ macro_rules! impl_mask_minimal {
1111
/// Creates a new instance with each vector elements initialized
1212
/// with the provided values.
1313
#[inline]
14-
#[promotable_const_fn]
1514
pub const fn new($($elem_name: bool),*) -> Self {
1615
$id($(Self::bool_to_internal($elem_name)),*)
1716
}
1817

1918
/// Converts a boolean type into the type of the vector lanes.
2019
#[inline]
21-
#[promotable_const_fn]
2220
const fn bool_to_internal(x: bool) -> $elem_ty {
2321
[0 as $elem_ty, !(0 as $elem_ty)][x as usize]
2422
}
2523

2624
/// Returns the number of vector lanes.
2725
#[inline]
28-
#[promotable_const_fn]
2926
pub const fn lanes() -> usize {
3027
$elem_count
3128
}
3229

3330
/// Constructs a new instance with each element initialized to
3431
/// `value`.
3532
#[inline]
36-
#[promotable_const_fn]
3733
pub const fn splat(value: bool) -> Self {
3834
$id($({
3935
#[allow(non_camel_case_types, dead_code)]

coresimd/ppsv/api/minimal.rs

-3
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,19 @@ macro_rules! impl_minimal {
1010
/// Creates a new instance with each vector elements initialized
1111
/// with the provided values.
1212
#[inline]
13-
#[promotable_const_fn]
1413
pub const fn new($($elem_name: $elem_ty),*) -> Self {
1514
$id($($elem_name),*)
1615
}
1716

1817
/// Returns the number of vector lanes.
1918
#[inline]
20-
#[promotable_const_fn]
2119
pub const fn lanes() -> usize {
2220
$elem_count
2321
}
2422

2523
/// Constructs a new instance with each element initialized to
2624
/// `value`.
2725
#[inline]
28-
#[promotable_const_fn]
2926
pub const fn splat(value: $elem_ty) -> Self {
3027
$id($({
3128
#[allow(non_camel_case_types, dead_code)]

crates/coresimd/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
staged_api, core_float, core_slice_ext, align_offset,
1717
doc_cfg, mmx_target_feature, tbm_target_feature,
1818
sse4a_target_feature, arm_target_feature, aarch64_target_feature,
19-
mips_target_feature, powerpc_target_feature, promotable_const_fn)]
19+
mips_target_feature, powerpc_target_feature)]
2020
#![cfg_attr(test,
2121
feature(proc_macro, test, attr_literals, abi_vectorcall,
2222
untagged_unions))]

crates/stdsimd/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
#![feature(const_fn, integer_atomics, staged_api, stdsimd)]
1111
#![feature(doc_cfg, allow_internal_unstable)]
12-
#![feature(promotable_const_fn)]
12+
#![feature(promotable_const_fn, custom_attributes)]
1313
#![cfg_attr(feature = "cargo-clippy", allow(shadow_reuse))]
1414
#![cfg_attr(target_os = "linux", feature(linkage))]
1515
#![no_std]

stdsimd/arch/detect/cache.rs

-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ struct Cache(AtomicU64);
7575
#[cfg(target_pointer_width = "64")]
7676
impl Cache {
7777
/// Creates an uninitialized cache.
78-
#[promotable_const_fn]
7978
const fn uninitialized() -> Self {
8079
Cache(AtomicU64::new(u64::max_value()))
8180
}
@@ -105,7 +104,6 @@ struct Cache(AtomicU32, AtomicU32);
105104
#[cfg(target_pointer_width = "32")]
106105
impl Cache {
107106
/// Creates an uninitialized cache.
108-
#[promotable_const_fn]
109107
const fn uninitialized() -> Self {
110108
Cache(
111109
AtomicU32::new(u32::max_value()),

0 commit comments

Comments
 (0)