Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix link in doc comment to ready #2177

Closed
wants to merge 1 commit into from

Conversation

sollyucko
Copy link

No description provided.

@@ -2,7 +2,7 @@ use core::pin::Pin;
use futures_core::future::{FusedFuture, Future};
use futures_core::task::{Context, Poll};

/// Future for the [`ready`](ready()) function.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary to avoid the ambiguity between future::ready function and ready! macro.

error: `ready` is both a function and a macro
 --> futures-util/src/future/ready.rs:5:21
  |
5 | /// Future for the [`ready`] function.
  |                     ^^^^^^^ ambiguous link
  |
  = note: `-D intra-doc-link-resolution-failure` implied by `-D warnings`
help: to link to the function, add parentheses
  |
5 | /// Future for the [`ready()`] function.
  |                     ^^^^^^^^^
help: to link to the macro, add an exclamation mark
  |
5 | /// Future for the [`ready!`] function.
  |                     ^^^^^^^^

https://travis-ci.com/github/rust-lang/futures-rs/jobs/347600517#L281-L312

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, seems all of the links to free function are broken: https://docs.rs/futures/0.3.5/futures/future/index.html#structs

The workaround I know is to use fn.ready.html. (I'm not sure how to fix this with intra-doc-link. intra-doc-link still has many bugs...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be very good to make a minimal repro of this and open an issue upstream. Testing locally it appears it's not fixed by rust-lang/rust#73101.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is because you're using [.`join`](join()), and the markdown parser doesn't like that. Either use [`join()`] or use [`join`](function@join).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, never mind

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because of the funky reexport

rust-lang/rust#73363

A quick fix would be to move that reexport to the bottom of the file, though since cross-crate stuff isn't working great anyway, might as well wait for rust-lang/rust#73101

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rust-lang/rust#73365 should land very soon

Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to close this as the intra-doc link issues (rust-lang/rust#65983, rust-lang/rust#73363) has been fixed and these links are now working correctly. Thanks anyway @sollyucko!

@taiki-e taiki-e closed this Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants