Skip to content

Commit

Permalink
Allow deprecated warnings (#2221)
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored Sep 30, 2020
1 parent cbaaac2 commit 8f9c4a6
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions futures-cpupool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;
extern crate num_cpus;
Expand Down
2 changes: 2 additions & 0 deletions futures-cpupool/tests/smoke.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;
extern crate futures_cpupool;

Expand Down
1 change: 1 addition & 0 deletions src/future/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ impl<E> fmt::Display for SharedError<E>
impl<E> error::Error for SharedError<E>
where E: error::Error,
{
#[allow(deprecated)]
fn description(&self) -> &str {
self.error.description()
}
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@

#![no_std]
#![deny(missing_docs, missing_debug_implementations)]
#![allow(bare_trait_objects, unknown_lints)]
#![doc(html_root_url = "https://docs.rs/futures/0.1")]

#[macro_use]
Expand Down
5 changes: 4 additions & 1 deletion src/task_impl/std/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use std::fmt;
use std::marker::PhantomData;
use std::mem;
use std::ptr;
use std::sync::{Arc, Mutex, Condvar, Once, ONCE_INIT};
use std::sync::{Arc, Mutex, Condvar, Once};
#[allow(deprecated)]
use std::sync::ONCE_INIT;
use std::sync::atomic::{AtomicUsize, Ordering};

use {Future, Stream, Sink, Poll, Async, StartSend, AsyncSink};
Expand All @@ -32,6 +34,7 @@ pub fn is_in_task() -> bool {
CURRENT_TASK.with(|task| !task.get().is_null())
}

#[allow(deprecated)]
static INIT: Once = ONCE_INIT;

pub fn get_ptr() -> Option<*mut u8> {
Expand Down
2 changes: 2 additions & 0 deletions tests/all.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

use std::sync::mpsc::{channel, TryRecvError};
Expand Down
2 changes: 2 additions & 0 deletions tests/bilock.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

use std::thread;
Expand Down
2 changes: 2 additions & 0 deletions tests/channel.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

use std::sync::atomic::*;
Expand Down
2 changes: 2 additions & 0 deletions tests/futures_ordered.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

use std::any::Any;
Expand Down
2 changes: 2 additions & 0 deletions tests/futures_unordered.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

use std::any::Any;
Expand Down
1 change: 1 addition & 0 deletions tests/mpsc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg(feature = "use_std")]
#![allow(bare_trait_objects, unknown_lints)]

#[macro_use]
extern crate futures;
Expand Down
2 changes: 2 additions & 0 deletions tests/recurse.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

use std::sync::mpsc::channel;
Expand Down
2 changes: 2 additions & 0 deletions tests/shared.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

mod support;
Expand Down
4 changes: 3 additions & 1 deletion tests/sink.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

use std::mem;
Expand Down Expand Up @@ -372,7 +374,7 @@ fn fanout_backpressure() {

let sink = StartSendFut::new(sink, 0).wait().unwrap();
let sink = StartSendFut::new(sink, 1).wait().unwrap();

let flag = Flag::new();
let mut task = executor::spawn(sink.send(2));
assert!(!flag.get());
Expand Down
2 changes: 2 additions & 0 deletions tests/stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(bare_trait_objects, unknown_lints)]

#[macro_use]
extern crate futures;

Expand Down
2 changes: 2 additions & 0 deletions tests/support/local_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//! futures-aware inter-thread communications, and is not intended to be used to
//! manage I/O. For futures that do I/O you'll likely want to use `tokio-core`.

#![allow(bare_trait_objects, unknown_lints)]

use std::cell::{Cell, RefCell};
use std::sync::{Arc, Mutex, mpsc};

Expand Down
1 change: 1 addition & 0 deletions tests/unsync.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg(feature = "use_std")]
#![allow(bare_trait_objects, unknown_lints)]

extern crate futures;

Expand Down

0 comments on commit 8f9c4a6

Please sign in to comment.