diff options
| author | gohome001 <3156514693@qq.com> | 2025-04-25 17:02:08 +0800 |
|---|---|---|
| committer | gohome001 <3156514693@qq.com> | 2025-04-25 17:02:08 +0800 |
| commit | 2ec065062a2328de40ff29282cbd56f66276a748 (patch) | |
| tree | 7dc43e8771f31e74287001723a86327eee364a57 /src/tools | |
| parent | 9031c86009c4d09cc315670bb3e03b70ef2d5edf (diff) | |
| download | rust-2ec065062a2328de40ff29282cbd56f66276a748.tar.gz rust-2ec065062a2328de40ff29282cbd56f66276a748.zip | |
minor: format
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide/src/highlight_related.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/highlight_related.rs b/src/tools/rust-analyzer/crates/ide/src/highlight_related.rs index 2943d60682a..90a7c62d71b 100644 --- a/src/tools/rust-analyzer/crates/ide/src/highlight_related.rs +++ b/src/tools/rust-analyzer/crates/ide/src/highlight_related.rs @@ -816,24 +816,22 @@ mod tests { check( r#" fn foo() { - unsafe fn this_is_unsafe_function() { - } + unsafe fn this_is_unsafe_function() {} - unsa$0fe { //^^^^^^ let raw_ptr = &42 as *const i32; let val = *raw_ptr; //^^^^^^^^ - + let mut_ptr = &mut 5 as *mut i32; *mut_ptr = 10; //^^^^^^^^ - + this_is_unsafe_function(); //^^^^^^^^^^^^^^^^^^^^^^^^^ } - + } "#, ); |
