rust/src
bors 8a3765582c Auto merge of #117758 - Urgau:lint_pointer_trait_comparisons, r=davidtwco
Add lint against ambiguous wide pointer comparisons

This PR is the resolution of https://github.com/rust-lang/rust/issues/106447 decided in https://github.com/rust-lang/rust/issues/117717 by T-lang.

## `ambiguous_wide_pointer_comparisons`

*warn-by-default*

The `ambiguous_wide_pointer_comparisons` lint checks comparison of `*const/*mut ?Sized` as the operands.

### Example

```rust
let ab = (A, B);
let a = &ab.0 as *const dyn T;
let b = &ab.1 as *const dyn T;

let _ = a == b;
```

### Explanation

The comparison includes metadata which may not be expected.

-------

This PR also drops `clippy::vtable_address_comparisons` which is superseded by this one.

~~One thing: is the current naming right? `invalid` seems a bit too much.~~

Fixes https://github.com/rust-lang/rust/issues/117717
2023-12-11 14:33:16 +00:00
..
bootstrap Revert "Use MCP510" 2023-12-10 23:22:20 +01:00
ci Build Fuchsia in CI 2023-12-07 16:30:36 -08:00
doc Auto merge of #118368 - GuillaumeGomez:env-flag, r=Nilstrieb 2023-12-10 21:48:53 +00:00
etc allow bypassing the build directory lock 2023-12-09 20:12:40 +03:00
librustdoc Rollup merge of #118812 - notriddle:notriddle/assoc-name-intern, r=GuillaumeGomez 2023-12-11 11:40:37 +01:00
llvm-project@7738295178 Update to LLVM 17.0.5 2023-11-14 12:06:30 +01:00
rustdoc-json-types rustdoc-json: Rename typedef to type alias 2023-08-21 14:02:34 -07:00
tools Auto merge of #117758 - Urgau:lint_pointer_trait_comparisons, r=davidtwco 2023-12-11 14:33:16 +00:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Bump stage0 to latest 2023-11-15 19:40:51 -05:00
version Bump nightly version 2023-11-11 11:29:33 -05: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.