mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Lift out workspace related data into a separate query to preserve crategraph deduplication
This commit is contained in:
parent
8905f86d8a
commit
db04f514f2
10 changed files with 98 additions and 97 deletions
|
@ -117,7 +117,7 @@ impl Attrs {
|
|||
}
|
||||
|
||||
impl Attrs {
|
||||
pub fn by_key<'attrs>(&'attrs self, key: &'attrs Symbol) -> AttrQuery<'_> {
|
||||
pub fn by_key<'attrs>(&'attrs self, key: &'attrs Symbol) -> AttrQuery<'attrs> {
|
||||
AttrQuery { attrs: self, key }
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,7 @@ impl<'attr> AttrQuery<'attr> {
|
|||
/// #[doc(html_root_url = "url")]
|
||||
/// ^^^^^^^^^^^^^ key
|
||||
/// ```
|
||||
pub fn find_string_value_in_tt(self, key: &'attr Symbol) -> Option<&str> {
|
||||
pub fn find_string_value_in_tt(self, key: &'attr Symbol) -> Option<&'attr str> {
|
||||
self.tt_values().find_map(|tt| {
|
||||
let name = tt.token_trees.iter()
|
||||
.skip_while(|tt| !matches!(tt, tt::TokenTree::Leaf(tt::Leaf::Ident(tt::Ident { sym, ..} )) if *sym == *key))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue