aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tests.rs')
-rw-r--r--crates/ide/src/syntax_highlighting/tests.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs
index da20c300e..2b667b0d4 100644
--- a/crates/ide/src/syntax_highlighting/tests.rs
+++ b/crates/ide/src/syntax_highlighting/tests.rs
@@ -84,11 +84,21 @@ fn foo<'a, T>() -> T {
84 foo::<'a, i32>() 84 foo::<'a, i32>()
85} 85}
86 86
87fn never() -> ! {
88 loop {}
89}
90
87use ops::Fn; 91use ops::Fn;
88fn baz<F: Fn() -> ()>(f: F) { 92fn baz<F: Fn() -> ()>(f: F) {
89 f() 93 f()
90} 94}
91 95
96fn foobar() -> impl Copy {}
97
98fn foo() {
99 let bar = foobar();
100}
101
92macro_rules! def_fn { 102macro_rules! def_fn {
93 ($($tt:tt)*) => {$($tt)*} 103 ($($tt:tt)*) => {$($tt)*}
94} 104}
@@ -150,6 +160,11 @@ fn main() {
150 160
151 let a = |x| x; 161 let a = |x| x;
152 let bar = Foo::baz; 162 let bar = Foo::baz;
163
164 let baz = -42;
165 let baz = -baz;
166
167 let _ = !true;
153} 168}
154 169
155enum Option<T> { 170enum Option<T> {