mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
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>
This commit is contained in:
parent
38505db391
commit
8d82ba7299
29 changed files with 294 additions and 87 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue