-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Point to the rustdoc attribute where intralink resolution failed. #51111
Point to the rustdoc attribute where intralink resolution failed. #51111
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
b8d411d
to
216c0af
Compare
Can you add a test for multiple lines please? (I want to be sure it won't give the first line of the doc comment.) Also, in a second time, it'd be nice to get the span for the link directly instead of its line (but it's just an improvement so not mandatory for this PR). |
216c0af
to
6852c13
Compare
@GuillaumeGomez Done. It now selects the entire documentation block. Unfortunately, I don't think it is possible to get the span of the link directly, because such information is not passed into Even we can compute the pointer offset of the |
What I meant was for example: /// a [link]
///
/// [blabla] To give:
|
@GuillaumeGomez That's not possible either because |
Hum :-/ |
Ping from triage, @GuillaumeGomez ! |
I wonder what we should do in here... Maybe just print the line where the link is and the line where the doc comment started? As is, it's not really useful (still better than what we have but not complete enough). Do you think you can do this? |
6852c13
to
2886aca
Compare
@GuillaumeGomez The output now looks like this:
|
Let's go for this version then. Thanks a lot! @bors: r+ |
📌 Commit 2886aca has been approved by |
…ers, r=GuillaumeGomez Point to the rustdoc attribute where intralink resolution failed.
☀️ Test successful - status-appveyor, status-travis |
Use spans pointing at the inside of a rustdoc attribute Follow up to rust-lang#51111. Point to the link in a rustdoc attribute where intralink resolution failed, instead of the full rustdoc attribute's span. r? @GuillaumeGomez cc @kennytm
No description provided.