Skip to content

Commit

Permalink
Allow deprecations in macros so we don't give everyone warnings
Browse files Browse the repository at this point in the history
The deprecations will be fixed later by raising the minimum supported
Rust version for this crate. These deprecations take effect in Rust 1.34
and were enabled in rust-lang/rust#57425.
  • Loading branch information
SSheldon committed Mar 25, 2019
1 parent d2176d1 commit c1d0b7e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ let cls = class!(NSObject);
#[macro_export]
macro_rules! class {
($name:ident) => ({
#[allow(deprecated)]
#[inline(always)]
fn get_class(name: &str) -> Option<&'static $crate::runtime::Class> {
unsafe {
Expand Down Expand Up @@ -44,6 +45,7 @@ macro_rules! sel_impl {
// Declare a function to hide unsafety, otherwise we can trigger the
// unused_unsafe lint; see rust-lang/rust#8472
($name:expr) => ({
#[allow(deprecated)]
#[inline(always)]
fn register_sel(name: &str) -> $crate::runtime::Sel {
unsafe {
Expand Down

0 comments on commit c1d0b7e

Please sign in to comment.