rust/src
bors 788c98df59 Auto merge of #111818 - Urgau:uplift_cmp_nan, r=cjgillot
Uplift `clippy::cmp_nan` lint

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

## `invalid_nan_comparisons`

~~(deny-by-default)~~ (warn-by-default)

The `invalid_nan_comparisons` lint checks comparison with `f32::NAN` or `f64::NAN` as one of the operand.

### Example

```rust,compile_fail
let a = 2.3f32;
if a == f32::NAN {}
```

### Explanation

NaN does not compare meaningfully to anything – not even itself – so those comparisons are always false.

-----

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-06-10 12:47:51 +00:00
..
bootstrap Compile rustc_driver by default 2023-06-09 10:47:41 -04:00
ci Use `--keep-stage also for the final build 2023-06-07 14:16:28 +02:00
doc Auto merge of #111626 - pjhades:output, r=b-naber 2023-06-09 09:45:40 +00:00
etc Rollup merge of #111962 - theIDinside:better-gdb, r=Mark-Simulacrum 2023-06-06 12:00:32 +02:00
librustdoc List matching impls on type aliases 2023-06-09 10:36:21 +02:00
llvm-project@22897bce7b Update to LLVM 16.0.5 2023-06-05 14:19:09 +02: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 #111818 - Urgau:uplift_cmp_nan, r=cjgillot 2023-06-10 12:47:51 +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 to 1.72.0 2023-05-27 14:23:37 -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.