diff options
| author | bors <bors@rust-lang.org> | 2021-05-03 05:41:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-03 05:41:23 +0000 |
| commit | 2428cc48167ac62019814d7f80c306424ab9fa93 (patch) | |
| tree | 590c990f489ced3823b61af15862281165d84a3d /compiler/rustc_codegen_llvm/src | |
| parent | 59f551a2dcf57c0d3d96ac5ef60e000524210469 (diff) | |
| parent | 6679f5ceb1bd367050bb69b239d94d6213696336 (diff) | |
| download | rust-2428cc48167ac62019814d7f80c306424ab9fa93.tar.gz rust-2428cc48167ac62019814d7f80c306424ab9fa93.zip | |
Auto merge of #84842 - blkerby:null_lowercase, r=joshtriplett
Replace 'NULL' with 'null' This replaces occurrences of "NULL" with "null" in docs, comments, and compiler error/lint messages. This is for the sake of consistency, as the lowercase "null" is already the dominant form in Rust. The all-caps NULL looks like the C macro (or SQL keyword), which seems out of place in a Rust context, given that NULL does not exist in the Rust language or standard library (instead having [`ptr::null()`](https://doc.rust-lang.org/stable/std/ptr/fn.null.html)).
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/metadata.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/metadata.rs b/compiler/rustc_codegen_llvm/src/metadata.rs index b007df57306..decc1e1f700 100644 --- a/compiler/rustc_codegen_llvm/src/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/metadata.rs @@ -66,7 +66,7 @@ fn search_meta_section<'a>( let mut name_buf = None; let name_len = llvm::LLVMRustGetSectionName(si.llsi, &mut name_buf); let name = name_buf.map_or_else( - String::new, // We got a NULL ptr, ignore `name_len`. + String::new, // We got a null ptr, ignore `name_len`. |buf| { String::from_utf8( slice::from_raw_parts(buf.as_ptr() as *const u8, name_len as usize) |
