Make lint missing-copy-implementations honor negative Copy impls - #114248
Conversation
|
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
I haven't tested conditional negative Copy impls since those are broken anyway I think? See #79098.
There was a problem hiding this comment.
Now using predicate_may_hold. That's much shorter and more legible, thanks for the suggestion!
However, I'm wondering if that could yield too many false positives since we're now considering ambiguous negative impls to be applicable (as well as ones that apply modulo opaque types).
Wouldn't predicate_must_hold_modulo_regions be a better fit?
There was a problem hiding this comment.
Yes, sorry about that. I think you're correct, predicate_must_hold_modulo_regions is the right method to use here I think.
0fa45de to
a0d8d28
Compare
This comment has been minimized.
This comment has been minimized.
a0d8d28 to
2b8a3b4
Compare
|
cc @spastorino for negative impls change |
I'm working on different things related to negative impls but it makes sense to me that this lint honor negative |
|
@bors r+ rollup |
…copy-impl, r=b-naber Make lint missing-copy-implementations honor negative `Copy` impls Fixes rust-lang#101980. `@rustbot` label A-lint F-negative_impls
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#114029 (Explain more clearly why `fn() -> T` can't be `#[derive(Clone)]`) - rust-lang#114248 (Make lint missing-copy-implementations honor negative `Copy` impls) - rust-lang#114498 (Print tidy command with bless tidy check failure) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #101980.
@rustbot label A-lint F-negative_impls