diff options
Diffstat (limited to 'crates/hir_ty/src/diagnostics/unsafe_check.rs')
-rw-r--r-- | crates/hir_ty/src/diagnostics/unsafe_check.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/diagnostics/unsafe_check.rs b/crates/hir_ty/src/diagnostics/unsafe_check.rs index 61ffbf5d1..21a121aad 100644 --- a/crates/hir_ty/src/diagnostics/unsafe_check.rs +++ b/crates/hir_ty/src/diagnostics/unsafe_check.rs | |||
@@ -190,13 +190,13 @@ struct Ty { | |||
190 | a: u8, | 190 | a: u8, |
191 | } | 191 | } |
192 | 192 | ||
193 | static mut static_mut: Ty = Ty { a: 0 }; | 193 | static mut STATIC_MUT: Ty = Ty { a: 0 }; |
194 | 194 | ||
195 | fn main() { | 195 | fn main() { |
196 | let x = static_mut.a; | 196 | let x = STATIC_MUT.a; |
197 | //^^^^^^^^^^ This operation is unsafe and requires an unsafe function or block | 197 | //^^^^^^^^^^ This operation is unsafe and requires an unsafe function or block |
198 | unsafe { | 198 | unsafe { |
199 | let x = static_mut.a; | 199 | let x = STATIC_MUT.a; |
200 | } | 200 | } |
201 | } | 201 | } |
202 | "#, | 202 | "#, |