diff options
author | Luca Casonato <hello@lcas.dev> | 2022-06-26 00:13:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-26 00:13:24 +0200 |
commit | 8d82ba729937baf83011354242cabc3d50c13dc2 (patch) | |
tree | 3e8c4d87986338639eeef4a76543e4335020262c /cli/lsp/logging.rs | |
parent | 38505db39137f33bfdb942658ea892a617ac0980 (diff) |
build: require safety comments on unsafe code (#13870)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/lsp/logging.rs')
-rw-r--r-- | cli/lsp/logging.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/lsp/logging.rs b/cli/lsp/logging.rs index b3fc06d89..88392dca2 100644 --- a/cli/lsp/logging.rs +++ b/cli/lsp/logging.rs @@ -21,7 +21,11 @@ pub fn set_lsp_log_level(level: log::Level) { pub fn lsp_log_level() -> log::Level { let level = LSP_LOG_LEVEL.load(Ordering::SeqCst); - unsafe { std::mem::transmute(level) } + // TODO(bartlomieju): + #[allow(clippy::undocumented_unsafe_blocks)] + unsafe { + std::mem::transmute(level) + } } /// Use this macro to do "info" logs in the lsp code. This allows |