From 269e67312d30e8e5a5c38cec3f12c52ba0d6d9b6 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 26 Oct 2020 22:27:28 +0100 Subject: Highlight never type as BuiltinType --- crates/ide/src/syntax_highlighting/test_data/highlighting.html | 6 ++++++ crates/ide/src/syntax_highlighting/tests.rs | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'crates/ide/src/syntax_highlighting') diff --git a/crates/ide/src/syntax_highlighting/test_data/highlighting.html b/crates/ide/src/syntax_highlighting/test_data/highlighting.html index c6b4f5a00..b0e547d57 100644 --- a/crates/ide/src/syntax_highlighting/test_data/highlighting.html +++ b/crates/ide/src/syntax_highlighting/test_data/highlighting.html @@ -110,6 +110,10 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd foo::<'a, i32>() } +fn never() -> ! { + loop {} +} + use ops::Fn; fn baz<F: Fn() -> ()>(f: F) { f() @@ -179,6 +183,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd let baz = -42; let baz = -baz; + + let _ = !true; } enum Option<T> { diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs index dd43f9dd9..f13cf3ef3 100644 --- a/crates/ide/src/syntax_highlighting/tests.rs +++ b/crates/ide/src/syntax_highlighting/tests.rs @@ -84,6 +84,10 @@ fn foo<'a, T>() -> T { foo::<'a, i32>() } +fn never() -> ! { + loop {} +} + use ops::Fn; fn baz ()>(f: F) { f() @@ -153,6 +157,8 @@ fn main() { let baz = -42; let baz = -baz; + + let _ = !true; } enum Option { -- cgit v1.2.3