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: doc url link type #12150

Merged
merged 2 commits into from
May 5, 2022
Merged

fix: doc url link type #12150

merged 2 commits into from
May 5, 2022

Conversation

yue4u
Copy link
Contributor

@yue4u yue4u commented May 4, 2022

fix: #12033

I did some debugging and found the cause looks like to be some doc links' LinkType are kept as Shortcut which don't make sense for url links.
This PR should resolve both problems in the origin issue, but aside this PR, more work are needed for doc_links.

about LinkType: https://github.com/raphlinus/pulldown-cmark/blob/f29bd1e228913690e5092c9594e4e607423ff0aa/src/lib.rs#L191-L210

Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

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

@bors delegate

Comment on lines 858 to 860
if !self.exists() {
return None;
}
Copy link
Member

Choose a reason for hiding this comment

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

This check is actually unnecessary

@@ -853,6 +853,23 @@ impl<'attr> AttrQuery<'attr> {
.iter()
.filter(move |attr| attr.path.as_ident().map_or(false, |s| s.to_smol_str() == key))
}

pub fn find_string_value_in_tt(self, key: &'attr str) -> Option<&SmolStr> {
Copy link
Member

Choose a reason for hiding this comment

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

Let's add a comment showing an example for what this specifically does (as the name is not too descriptive, but I also do not have a better one). Something like

/// #[doc(html_root_url = "url")]
/// ^^^^^^^^^^^^^ key

should suffice

@yue4u
Copy link
Contributor Author

yue4u commented May 4, 2022

@bors delegate

Guess you have to type exact delegate+ as #11991 (comment) 😄

@lnicola
Copy link
Member

lnicola commented May 4, 2022

@bors delegate+

@bors
Copy link
Collaborator

bors commented May 4, 2022

✌️ @rainy-me can now approve this pull request

@yue4u
Copy link
Contributor Author

yue4u commented May 5, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented May 5, 2022

📌 Commit ddff1b2 has been approved by rainy-me

@bors
Copy link
Collaborator

bors commented May 5, 2022

⌛ Testing commit ddff1b2 with merge 0218aeb...

@bors
Copy link
Collaborator

bors commented May 5, 2022

☀️ Test successful - checks-actions
Approved by: rainy-me
Pushing 0218aeb to master...

@bors bors merged commit 0218aeb into rust-lang:master May 5, 2022
@lnicola
Copy link
Member

lnicola commented May 5, 2022

changelog fix fix keyword doc links in hover

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VSCode: Missing/not working hover links in "move" docs
4 participants