]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #107553 - edward-shen:edward-shen/suggest-null-ptr, r=WaffleLapkin
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Mon, 6 Feb 2023 14:24:13 +0000 (19:54 +0530)
committerGitHub <noreply@github.com>
Mon, 6 Feb 2023 14:24:13 +0000 (19:54 +0530)
Suggest std::ptr::null if literal 0 is given to a raw pointer function argument

Implementation feels a little sus (we're parsing the span for a `0`) but it seems to fall in line the string-expected-found-char condition right above this check, so I think it's fine.

Feedback appreciated on help text? I think it's consistent but it does sound a little awkward maybe?

Fixes #107517


Trivial merge