diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-30 09:46:08 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-30 09:46:08 +0100 |
commit | 733f1d8b709788225bd06f8c0aee1819db92620b (patch) | |
tree | d17395e4c3f7965c5cf9bdd50ef940e52eef1155 /crates/ra_ide_api/src | |
parent | c913b48928107710d6ec87a455b1ae6891297c2b (diff) | |
parent | f7e12559cb26b59a9a2ecee4deecaf6fe9100d16 (diff) |
Merge #1934
1934: Parse Path and AttrInput in Attr r=matklad a=uHOOCCOOHu
[Syntax reference](https://doc.rust-lang.org/reference/attributes.html#attributes)
Co-authored-by: uHOOCCOOHu <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/display/structure.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/snapshots/highlighting.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs index be042ed17..38a56d752 100644 --- a/crates/ra_ide_api/src/display/structure.rs +++ b/crates/ra_ide_api/src/display/structure.rs | |||
@@ -77,7 +77,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> { | |||
77 | node_range: node.syntax().text_range(), | 77 | node_range: node.syntax().text_range(), |
78 | kind: node.syntax().kind(), | 78 | kind: node.syntax().kind(), |
79 | detail, | 79 | detail, |
80 | deprecated: node.attrs().filter_map(|x| x.as_named()).any(|x| x == "deprecated"), | 80 | deprecated: node.attrs().filter_map(|x| x.simple_name()).any(|x| x == "deprecated"), |
81 | }) | 81 | }) |
82 | } | 82 | } |
83 | 83 | ||
diff --git a/crates/ra_ide_api/src/snapshots/highlighting.html b/crates/ra_ide_api/src/snapshots/highlighting.html index b39c4d371..ae30ebba3 100644 --- a/crates/ra_ide_api/src/snapshots/highlighting.html +++ b/crates/ra_ide_api/src/snapshots/highlighting.html | |||
@@ -19,7 +19,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
19 | .keyword\.unsafe { color: #DFAF8F; } | 19 | .keyword\.unsafe { color: #DFAF8F; } |
20 | .keyword\.control { color: #F0DFAF; font-weight: bold; } | 20 | .keyword\.control { color: #F0DFAF; font-weight: bold; } |
21 | </style> | 21 | </style> |
22 | <pre><code><span class="attribute">#</span><span class="attribute">[</span><span class="attribute">derive</span><span class="attribute">(</span><span class="attribute">Clone</span><span class="attribute">,</span><span class="attribute"> </span><span class="attribute">Debug</span><span class="attribute">)</span><span class="attribute">]</span> | 22 | <pre><code><span class="attribute">#</span><span class="attribute">[</span><span class="attribute text">derive</span><span class="attribute">(</span><span class="attribute">Clone</span><span class="attribute">,</span><span class="attribute"> </span><span class="attribute">Debug</span><span class="attribute">)</span><span class="attribute">]</span> |
23 | <span class="keyword">struct</span> <span class="type">Foo</span> { | 23 | <span class="keyword">struct</span> <span class="type">Foo</span> { |
24 | <span class="keyword">pub</span> <span class="field">x</span>: <span class="type">i32</span>, | 24 | <span class="keyword">pub</span> <span class="field">x</span>: <span class="type">i32</span>, |
25 | <span class="keyword">pub</span> <span class="field">y</span>: <span class="type">i32</span>, | 25 | <span class="keyword">pub</span> <span class="field">y</span>: <span class="type">i32</span>, |