rust/src
bors 63ef74b6aa Auto merge of #111717 - Urgau:uplift_fn_null_check, r=oli-obk
Uplift `clippy::fn_null_check` lint

This PR aims at uplifting the `clippy::fn_null_check` lint into rustc.

## `incorrect_fn_null_checks`

(warn-by-default)

The `incorrect_fn_null_checks` lint checks for expression that checks if a function pointer is null.

### Example

```rust
let fn_ptr: fn() = /* somehow obtained nullable function pointer */

if (fn_ptr as *const ()).is_null() { /* ... */ }
```

### Explanation

Function pointers are assumed to be non-null, checking for their nullity is incorrect.

-----

Mostly followed the instructions for uplifting a clippy lint described here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751

`@rustbot` label: +I-lang-nominated
r? compiler
2023-07-11 09:34:48 +00:00
..
bootstrap Rollup merge of #113551 - jyn514:dry-run-exclude, r=ozkanonur 2023-07-11 00:58:18 +02:00
ci CI: use macos-13 runner for Apple jobs 2023-07-10 20:22:15 +02:00
doc Rollup merge of #113548 - rustbot:docs-update, r=ehuss 2023-07-11 00:58:17 +02:00
etc User may want to skip tidy check sometimes 2023-06-30 15:37:10 +08:00
librustdoc Replace RPITIT current impl with new strategy that lowers as a GAT 2023-07-08 18:21:34 -03:00
llvm-project@06248fa7f3 Update LLVM submodule 2023-06-20 00:49:54 +01:00
rustdoc-json-types Verify that ItemEnum can be serialized and then deserialized using bincode 2023-05-22 18:26:20 +01:00
tools Auto merge of #111717 - Urgau:uplift_fn_null_check, r=oli-obk 2023-07-11 09:34:48 +00:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Bump to latest beta compiler 2023-05-30 08:00:10 -04:00
version Bump version 2023-07-08 10:35:49 -04:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.