Skip to content

Commit

Permalink
Bump minimum Rust version to 1.30 to use stable macro :vis matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Feb 24, 2019
1 parent 09b4945 commit 64bd7b8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ macro for providing scoped access to thread local storage (TLS) so any type can
be stored into TLS.
"""

[features]
nightly = []
22 changes: 0 additions & 22 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,13 @@
//! ```

#![deny(missing_docs, warnings)]
#![cfg_attr(feature = "nightly", feature(macro_vis_matcher))]
#![cfg_attr(feature = "nightly", feature(allow_internal_unstable))]

use std::cell::Cell;
use std::marker;
use std::thread::LocalKey;

/// The macro. See the module level documentation for the description and examples.
#[macro_export]
#[cfg(not(feature = "nightly"))]
macro_rules! scoped_thread_local {
($(#[$attrs:meta])* static $name:ident: $ty:ty) => (
$(#[$attrs])*
static $name: $crate::ScopedKey<$ty> = $crate::ScopedKey {
inner: {
thread_local!(static FOO: ::std::cell::Cell<usize> = {
::std::cell::Cell::new(0)
});
&FOO
},
_marker: ::std::marker::PhantomData,
};
)
}

/// The macro. See the module level documentation for the description and examples.
#[macro_export]
#[allow_internal_unstable]
#[cfg(feature = "nightly")]
macro_rules! scoped_thread_local {
($(#[$attrs:meta])* $vis:vis static $name:ident: $ty:ty) => (
$(#[$attrs])*
Expand Down

0 comments on commit 64bd7b8

Please sign in to comment.