Skip to content

Commit 1b70573

Browse files
committed
Use #[allow_internal_unstable] so that dependents don't have to declare feature(const_fn)
1 parent c429fa1 commit 1b70573

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The `Deref` implementation uses a hidden static variable that is guarded by a at
6868
6969
*/
7070

71-
#![cfg_attr(feature="nightly", feature(const_fn, core_intrinsics))]
71+
#![cfg_attr(feature="nightly", feature(const_fn, allow_internal_unstable))]
7272

7373
#[cfg(not(feature="nightly"))]
7474
pub mod lazy;
@@ -78,6 +78,7 @@ pub mod lazy;
7878
pub mod lazy;
7979

8080
#[macro_export]
81+
#[cfg_attr(feature="nightly", allow_internal_unstable)]
8182
macro_rules! lazy_static {
8283
($(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
8384
lazy_static!(@PRIV, $(#[$attr])* static ref $N : $T = $e; $($t)*);

src/nightly_lazy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ impl<T: Sync> Lazy<T> {
3131
unsafe impl<T: Sync> Sync for Lazy<T> {}
3232

3333
#[macro_export]
34+
#[allow_internal_unstable]
3435
macro_rules! __lazy_static_create {
3536
($NAME:ident, $T:ty) => {
3637
static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::new();

0 commit comments

Comments
 (0)