diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2020-12-19 02:43:00 +0100 |
|---|---|---|
| committer | Jonas Schievink <jonasschievink@gmail.com> | 2020-12-19 02:43:00 +0100 |
| commit | 81ccf37d3b8a5ffdf5c2d537761eeb06ae29dd7e (patch) | |
| tree | 7a32c4fcf9b173fd7540b2ed2994dc8b1edbdcec | |
| parent | e47e7a0143a537ef76b0f946dfc3ec56ed2e0507 (diff) | |
| download | rust-81ccf37d3b8a5ffdf5c2d537761eeb06ae29dd7e.tar.gz rust-81ccf37d3b8a5ffdf5c2d537761eeb06ae29dd7e.zip | |
Remove `Attrs::merge`
Only the `RawAttrs` version of this is in use
| -rw-r--r-- | crates/hir_def/src/attr.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index d1ed23947de..aacfeef28f3 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs @@ -241,18 +241,6 @@ impl Attrs { raw_attrs.filter(db, def.krate(db)) } - pub fn merge(&self, other: Attrs) -> Attrs { - match (&self.0.entries, &other.0.entries) { - (None, None) => Attrs::EMPTY, - (Some(entries), None) | (None, Some(entries)) => { - Attrs(RawAttrs { entries: Some(entries.clone()) }) - } - (Some(a), Some(b)) => { - Attrs(RawAttrs { entries: Some(a.iter().chain(b.iter()).cloned().collect()) }) - } - } - } - pub fn by_key(&self, key: &'static str) -> AttrQuery<'_> { AttrQuery { attrs: self, key } } |
