We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d1743a commit e525239Copy full SHA for e525239
crates/ide/src/highlight_related.rs
@@ -811,6 +811,34 @@ mod tests {
811
assert_eq!(expected, actual);
812
}
813
814
+ #[test]
815
+ fn test_hl_unsafe_block() {
816
+ check(
817
+ r#"
818
+fn foo() {
819
+ unsafe fn this_is_unsafe_function() {
820
+ }
821
+
822
823
+ unsa$0fe {
824
+ //^^^^^^
825
+ let raw_ptr = &42 as *const i32;
826
+ let val = *raw_ptr;
827
+ //^^^^^^^^
828
829
+ let mut_ptr = &mut 5 as *mut i32;
830
+ *mut_ptr = 10;
831
832
833
+ this_is_unsafe_function();
834
+ //^^^^^^^^^^^^^^^^^^^^^^^^^
835
836
837
+}
838
+"#,
839
+ );
840
841
842
#[test]
843
fn test_hl_tuple_fields() {
844
check(
0 commit comments