Files
rust/library
Matthias Krüger c2f228f654 Rollup merge of #115607 - RalfJung:safe-traits-unsafe-code, r=dtolnay
clarify that unsafe code must not rely on our safe traits

This adds a disclaimer to PartialEq, Eq, PartialOrd, Ord, Hash, Deref, DerefMut.

We already have a similar disclaimer in ExactSizeIterator (worded a bit differently):
```
/// Note that this trait is a safe trait and as such does *not* and *cannot*
/// guarantee that the returned length is correct. This means that `unsafe`
/// code **must not** rely on the correctness of [`Iterator::size_hint`]. The
/// unstable and unsafe [`TrustedLen`](super::marker::TrustedLen) trait gives
/// this additional guarantee.
```
If there are any other traits that should carry such a disclaimer, please let me know.

Fixes https://github.com/rust-lang/rust/issues/73682
2023-09-16 11:48:18 +02:00
..
2023-08-22 15:01:14 -07:00
2023-08-23 20:05:14 -04:00
2023-08-23 20:05:14 -04:00
2023-07-31 16:13:02 +08:00
2023-08-23 20:05:14 -04:00
2023-08-23 20:05:14 -04:00
2023-09-13 16:41:38 +03:00
2023-09-05 19:56:20 +02:00
2023-08-23 20:05:14 -04:00
2023-08-23 20:05:14 -04:00