diff options
author | Lukas Wirth <[email protected]> | 2021-01-28 18:06:33 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-01-28 18:08:55 +0000 |
commit | 426ad8e165aeb70a3d12b8bc870cb0c57a308bc7 (patch) | |
tree | d40c9d6ed4a234a0d3a56d14f64f97b8bf7fdf8b /crates/ide | |
parent | f421ee672253499b8ca8d1badf98db42525a5216 (diff) |
Classify function calls as functions when shadowed by types
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/syntax_highlighting/test_data/highlighting.html | 4 | ||||
-rw-r--r-- | crates/ide/src/syntax_highlighting/tests.rs | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/test_data/highlighting.html b/crates/ide/src/syntax_highlighting/test_data/highlighting.html index 237149566..2f983c0b8 100644 --- a/crates/ide/src/syntax_highlighting/test_data/highlighting.html +++ b/crates/ide/src/syntax_highlighting/test_data/highlighting.html | |||
@@ -108,6 +108,10 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
108 | <span class="brace">}</span> | 108 | <span class="brace">}</span> |
109 | <span class="brace">}</span> | 109 | <span class="brace">}</span> |
110 | 110 | ||
111 | <span class="keyword">fn</span> <span class="function declaration">str</span><span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="brace">{</span> | ||
112 | <span class="function">str</span><span class="parenthesis">(</span><span class="parenthesis">)</span><span class="semicolon">;</span> | ||
113 | <span class="brace">}</span> | ||
114 | |||
111 | <span class="keyword">static</span> <span class="keyword">mut</span> <span class="static declaration mutable unsafe">STATIC_MUT</span><span class="colon">:</span> <span class="builtin_type">i32</span> <span class="operator">=</span> <span class="numeric_literal">0</span><span class="semicolon">;</span> | 115 | <span class="keyword">static</span> <span class="keyword">mut</span> <span class="static declaration mutable unsafe">STATIC_MUT</span><span class="colon">:</span> <span class="builtin_type">i32</span> <span class="operator">=</span> <span class="numeric_literal">0</span><span class="semicolon">;</span> |
112 | 116 | ||
113 | <span class="keyword">fn</span> <span class="function declaration">foo</span><span class="angle"><</span><span class="lifetime declaration">'a</span><span class="comma">,</span> <span class="type_param declaration">T</span><span class="angle">></span><span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="operator">-></span> <span class="type_param">T</span> <span class="brace">{</span> | 117 | <span class="keyword">fn</span> <span class="function declaration">foo</span><span class="angle"><</span><span class="lifetime declaration">'a</span><span class="comma">,</span> <span class="type_param declaration">T</span><span class="angle">></span><span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="operator">-></span> <span class="type_param">T</span> <span class="brace">{</span> |
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs index a62704c39..1854da914 100644 --- a/crates/ide/src/syntax_highlighting/tests.rs +++ b/crates/ide/src/syntax_highlighting/tests.rs | |||
@@ -81,6 +81,10 @@ impl FooCopy { | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | fn str() { | ||
85 | str(); | ||
86 | } | ||
87 | |||
84 | static mut STATIC_MUT: i32 = 0; | 88 | static mut STATIC_MUT: i32 = 0; |
85 | 89 | ||
86 | fn foo<'a, T>() -> T { | 90 | fn foo<'a, T>() -> T { |