mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 19:28:29 +00:00

Do not allow `Drop` impl on foreign fundamental types `Drop` should not be implemented on `Pin<T>` even if `T` is local. This does not trigger regular orphan rules is because `Pin` is `#[fundamental]`... but we don't allow specialized `Drop` impls anyways, so these rules are not sufficient to prevent this impl on stable. Let's just choose even stricter rules, since we shouldn't be implementing `Drop` on a foreign ADT ever. Fixes #99575
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.