[llvm] [Inline] Allow inlining with null_pointer_is_valid mismatch (PR #190510)

Gary Guo via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 5 17:04:28 PDT 2026


nbdd0121 wrote:

Given the niche optimization that is ubiquitous in Rust, `null_pointer_is_valid` usually isn't of much utility. Your code will still go horrible wrong if you use a method that expects non-null pointer unsafely.

E.g. `Some(NonNull::neew_unchecked(ptr))` giving you a `None`. So I think providing this option does more harm (confusion to users) than good in Rust.

https://github.com/llvm/llvm-project/pull/190510


More information about the llvm-commits mailing list