-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: doc url link type #12150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bors delegate
crates/hir-def/src/attr.rs
Outdated
if !self.exists() { | ||
return None; | ||
} |
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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
Guess you have to type exact |
@bors delegate+ |
✌️ @rainy-me can now approve this pull request |
594e4dd
to
ddff1b2
Compare
@bors r+ |
📌 Commit ddff1b2 has been approved by |
☀️ Test successful - checks-actions |
fix: #12033
I did some debugging and found the cause looks like to be some doc links'
LinkType
are kept asShortcut
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