Skip to content

Commit 2ca8fca

Browse files
committed
Add test cases for attribute highlighting
1 parent efd2417 commit 2ca8fca

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<span class="hljs-meta">#[foo]</span>
2+
<span class="hljs-meta">#![foo]</span>
3+
4+
<span class="hljs-meta">#[foo(bar)]</span>
5+
<span class="hljs-meta">#[foo = bar]</span>
6+
<span class="hljs-meta">#[foo(<span class="hljs-string">&quot;a \&quot;b\&quot; c&quot;</span>)]</span>
7+
<span class="hljs-meta">#[foo(bar = [a, b, c])]</span>
8+
<span class="hljs-meta">#[foo[bar]]</span>
9+
<span class="hljs-meta">#[foo{bar}]</span>
10+
11+
<span class="hljs-meta">#![no_std]</span>
12+
<span class="hljs-meta">#[doc = <span class="hljs-string">&quot;example&quot;</span>]</span>
13+
<span class="hljs-meta">#[allow(unused, clippy::inline_always)]</span>
14+
<span class="hljs-meta">#[macro_use(foo, bar)]</span>
15+
<span class="hljs-meta">#[link(name = <span class="hljs-string">&quot;CoreFoundation&quot;</span>, kind = <span class="hljs-string">&quot;framework&quot;</span>)]</span>
16+
17+
<span class="hljs-meta">#[rtic::app(device = lm3s6965, dispatchers = [UART0, UART1])]</span>
18+
<span class="hljs-meta">#[task(binds = USB_OTG1, local = [poller])]</span>

test/markup/rust/attributes.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#[foo]
2+
#![foo]
3+
4+
#[foo(bar)]
5+
#[foo = bar]
6+
#[foo("a \"b\" c")]
7+
#[foo(bar = [a, b, c])]
8+
#[foo[bar]]
9+
#[foo{bar}]
10+
11+
#![no_std]
12+
#[doc = "example"]
13+
#[allow(unused, clippy::inline_always)]
14+
#[macro_use(foo, bar)]
15+
#[link(name = "CoreFoundation", kind = "framework")]
16+
17+
#[rtic::app(device = lm3s6965, dispatchers = [UART0, UART1])]
18+
#[task(binds = USB_OTG1, local = [poller])]

0 commit comments

Comments
 (0)