Skip to content

Commit 9f9b665

Browse files
committed
Some more warnings and links fixed
TODO: note that paths like futures_core::task::Context actually get redirected to core::task::Context in the redered docs. Is this desirable? If so, should we change the paths here? Also, there is cross crate links in here. They are not going to work anytime soon. Do we put https links in here? to here: https://rust-lang-nursery.github.io/futures-api-docs? The problem is these have a version hardcoded in the url: 0.3.0-alpha.15 We could link to docs.rs, but currently that says: docs.rs failed to build futures-preview-0.3.0-alpha.15 -> ok the reason seems to be that they are on 2019-04-17 which does still have futures-api unstable feature, so that should get solved.
1 parent 1b2dddf commit 9f9b665

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

futures-executor/src/local_pool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use std::thread::{self, Thread};
2323
/// [`Spawn`](futures_core::task::Spawn), use the
2424
/// [`spawner()`](LocalPool::spawner) method. Because the executor is
2525
/// single-threaded, it supports a special form of task spawning for non-`Send`
26-
/// futures, via [`spawn_local_obj`](LocalSpawner::spawn_local_obj).
26+
/// futures, via [`spawn_local_obj`](crate::task::LocalSpawn::spawn_local_obj).
2727
#[derive(Debug)]
2828
pub struct LocalPool {
2929
pool: FuturesUnordered<LocalFutureObj<'static, ()>>,

futures-test/src/task/mod.rs

+20-11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
// TODO: note that paths like futures_core::task::Context actually get redirected to core::task::Context
2+
// in the redered docs. Is this desirable? If so, should we change the paths here?
3+
//
4+
// Also, there is cross crate links in here. They are not going to work anytime soon. Do we put https links
5+
// in here? to here: https://rust-lang-nursery.github.io/futures-api-docs? The problem is these have a
6+
// version hardcoded in the url: 0.3.0-alpha.15 We could link to docs.rs, but currently that says:
7+
// docs.rs failed to build futures-preview-0.3.0-alpha.15 -> ok the reason seems to be that they are on
8+
// 2019-04-17 which does still have futures-api unstable feature, so that should get solved.
9+
//
110
//! Task related testing utilities.
211
//!
312
//! This module provides utilities for creating test
@@ -6,29 +15,29 @@
615
//! [`Spawn`](futures_core::task::Spawn) implementations.
716
//!
817
//! Test contexts:
9-
//! - [`noop_context`] creates a context that ignores calls to
18+
//! - [`noop_context`](crate::task::noop_context) creates a context that ignores calls to
1019
//! [`cx.waker().wake_by_ref()`](futures_core::task::Waker).
11-
//! - [`panic_context`] creates a context that panics when
20+
//! - [`panic_context`](crate::task::panic_context) creates a context that panics when
1221
//! [`cx.waker().wake_by_ref()`](futures_core::task::Waker) is called.
1322
//!
1423
//! Test wakers:
15-
//! - [`noop_waker`] creates a waker that ignores calls to
24+
//! - [`noop_waker`](crate::task::noop_waker) creates a waker that ignores calls to
1625
//! [`wake`](futures_core::task::Waker).
17-
//! - [`panic_waker`] creates a waker that panics when
26+
//! - [`panic_waker`](crate::task::panic_waker::panic_waker) creates a waker that panics when
1827
//! [`wake`](futures_core::task::Waker) is called.
19-
//! - [`new_count_waker`] creates a waker that increments a counter whenever
28+
//! - [`new_count_waker`](crate::task::new_count_waker) creates a waker that increments a counter whenever
2029
//! [`wake`](futures_core::task::Waker) is called.
2130
//!
2231
//! Test spawners:
23-
//! - [`NoopSpawner`] ignores calls to
24-
//! [`spawn`](futures_core::task::Spawn::spawn)
25-
//! - [`PanicSpawner`] panics if [`spawn`](futures_core::task::Spawn::spawn) is
32+
//! - [`NoopSpawner`](crate::task::NoopSpawner) ignores calls to
33+
//! [`spawn`](::futures_core::task::Spawn::spawn)
34+
//! - [`PanicSpawner`](crate::task::PanicSpawner) panics if [`spawn`](futures_core::task::Spawn::spawn) is
2635
//! called.
27-
//! - [`RecordSpawner`] records the spawned futures.
36+
//! - [`RecordSpawner`](crate::task::RecordSpawner) records the spawned futures.
2837
//!
2938
//! For convenience there additionally exist various functions that directly
30-
//! return waker/spawner references: [`noop_waker_ref`],
31-
//! [`panic_waker_ref`], [`noop_spawner_mut`] and [`panic_spawner_mut`].
39+
//! return waker/spawner references: [`noop_waker_ref`](crate::task::noop_waker_ref),
40+
//! [`panic_waker_ref`](crate::task::panic_waker_ref), [`noop_spawner_mut`](crate::task::noop_spawner_mut) and [`panic_spawner_mut`](crate::task::panic_spawner_mut).
3241
3342
mod context;
3443
pub use self::context::{noop_context, panic_context};

0 commit comments

Comments
 (0)