You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
emit the suspicious_auto_trait_impls for negative impls as well #108804
warning: cross-crate traits with a default impl, like `Send`, should not be specialized
--> src/lib.rs:7:1
|
7 | unsafe impl<T> SendforBar<T,T>{}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this will change its meaning in a future release!
= note:for more information,[see issue #93367 <https://github.com/rust-lang/rust/issues/93367>](https://github.com/rust-lang/rust/issues/93367)
= note: `T` is mentioned multiple times
note: try using the same sequence of generic parameters as the struct definition
--> src/lib.rs:6:1
|
6 | struct Bar<T,U>(T,U);
| ^^^^^^^^^^^^^^^^
= note: `#[warn(suspicious_auto_trait_impls)]` on by default
the lint should also be emitted for the negative impl. The lint was implemented in #93267. To fix that remove the following line and add a test:
Activity
mu001999 commentedon Mar 6, 2023
@rustbot claim
Rollup merge of rust-lang#108807 - MU001999:lint/suspicious_auto_trai…
Rollup merge of rust-lang#108807 - MU001999:lint/suspicious_auto_trai…