diff options
author | Jonas Schievink <[email protected]> | 2020-09-18 17:09:47 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-09-18 17:09:47 +0100 |
commit | 7474a42b001b0fea51f761173bd3e194b7901f75 (patch) | |
tree | d6cb20f9b08865c6a0858352578b61b2d777d235 /crates/hir_def/src | |
parent | baab72e611fa985c2e62e964f3a48ad31367220f (diff) |
Remove incorrect docs
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r-- | crates/hir_def/src/attr.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index a841b97bf..dea552a60 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs | |||
@@ -171,9 +171,6 @@ pub struct AttrQuery<'a> { | |||
171 | } | 171 | } |
172 | 172 | ||
173 | impl<'a> AttrQuery<'a> { | 173 | impl<'a> AttrQuery<'a> { |
174 | /// For an attribute like `#[attr(value)]`, returns the `(value)` subtree. | ||
175 | /// | ||
176 | /// If the attribute does not have a token tree argument, returns `None`. | ||
177 | pub fn tt_values(self) -> impl Iterator<Item = &'a Subtree> { | 174 | pub fn tt_values(self) -> impl Iterator<Item = &'a Subtree> { |
178 | self.attrs().filter_map(|attr| match attr.input.as_ref()? { | 175 | self.attrs().filter_map(|attr| match attr.input.as_ref()? { |
179 | AttrInput::TokenTree(it) => Some(it), | 176 | AttrInput::TokenTree(it) => Some(it), |
@@ -181,9 +178,6 @@ impl<'a> AttrQuery<'a> { | |||
181 | }) | 178 | }) |
182 | } | 179 | } |
183 | 180 | ||
184 | /// For an attribute like `#[key = "value"]`, returns `"value"`. | ||
185 | /// | ||
186 | /// Returns `None` if the attribute does not have `key = "value"` form. | ||
187 | pub fn string_value(self) -> Option<&'a SmolStr> { | 181 | pub fn string_value(self) -> Option<&'a SmolStr> { |
188 | self.attrs().find_map(|attr| match attr.input.as_ref()? { | 182 | self.attrs().find_map(|attr| match attr.input.as_ref()? { |
189 | AttrInput::Literal(it) => Some(it), | 183 | AttrInput::Literal(it) => Some(it), |