]> git.lizzy.rs Git - rust.git/commit
Auto merge of #6046 - rail-rain:change_criteria_non_copy_const, r=flip1995
authorbors <bors@rust-lang.org>
Fri, 18 Sep 2020 14:34:04 +0000 (14:34 +0000)
committerbors <bors@rust-lang.org>
Fri, 18 Sep 2020 14:34:04 +0000 (14:34 +0000)
commitd88b9b7543756afef81dcb2e2c37a11603d513d5
tree8dc61ee72e3ac402bc7b8c6fbd208dc5b5a31840
parent5af88e3c2d8cc4fb74a0e455381669930ee3a31a
parentd5af360bb2de24235d2873e926d0b6f21135ae38
Auto merge of #6046 - rail-rain:change_criteria_non_copy_const, r=flip1995

Change the criteria of `interior_mutable_const`

This implements my suggestion [here](https://github.com/rust-lang/rust-clippy/issues/5050#issuecomment-680310889), and so hopefully fixes #5050.

* stop linting associated types and generic type parameters
* start linting ones in trait impls
  whose corresponding definitions in the traits are generic
* remove the `is_copy` check
  as presumably the only purpose of it is to allow
  generics with `Copy` bounds as `Freeze` is internal
  and generics are no longer linted
* remove the term 'copy' from the tests
  as being `Copy` no longer have meaning

---

changelog: Change the criteria of `declare_interior_mutable_const` and `borrow_interior_mutable_const` to narrow the lints to only lint things that defenitly is a interior mutable type, not potentially.