rust/tests/ui/auto-traits/suspicious-impls-lint.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

83 lines
3.5 KiB
Plaintext
Raw Normal View History

error: cross-crate traits with a default impl, like `Send`, should not be specialized
2022-02-24 01:36:29 -06:00
--> $DIR/suspicious-impls-lint.rs:9:1
|
LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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>
= note: `&T` is not a generic parameter
note: try using the same sequence of generic parameters as the struct definition
2022-02-24 01:36:29 -06:00
--> $DIR/suspicious-impls-lint.rs:8:1
|
LL | struct MayImplementSendErr<T>(T);
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-09-18 10:55:36 -05:00
note: the lint level is defined here
--> $DIR/suspicious-impls-lint.rs:1:9
|
LL | #![deny(suspicious_auto_trait_impls)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: cross-crate traits with a default impl, like `Send`, should not be specialized
2022-02-24 01:36:29 -06:00
--> $DIR/suspicious-impls-lint.rs:21:1
|
LL | unsafe impl Send for ContainsVec<i32> {}
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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>
= note: `i32` is not a generic parameter
note: try using the same sequence of generic parameters as the struct definition
2022-02-24 01:36:29 -06:00
--> $DIR/suspicious-impls-lint.rs:20:1
|
LL | struct ContainsVec<T>(Vec<T>);
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^
error: cross-crate traits with a default impl, like `Send`, should not be specialized
2022-02-24 01:36:29 -06:00
--> $DIR/suspicious-impls-lint.rs:32:1
|
LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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>
= note: `T` is mentioned multiple times
note: try using the same sequence of generic parameters as the struct definition
2022-02-24 01:36:29 -06:00
--> $DIR/suspicious-impls-lint.rs:31:1
|
LL | struct TwoParamsSame<T, U>(T, U);
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-02-24 01:36:29 -06:00
error: cross-crate traits with a default impl, like `Send`, should not be specialized
--> $DIR/suspicious-impls-lint.rs:40:1
|
LL | unsafe impl<T> Send for WithPhantomDataSend<*const T, i8> {}
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-02-24 01:36:29 -06:00
|
= 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>
= note: `*const T` is not a generic parameter
2022-02-24 01:36:29 -06:00
note: try using the same sequence of generic parameters as the struct definition
--> $DIR/suspicious-impls-lint.rs:39:1
|
LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-02-24 01:36:29 -06:00
error: cross-crate traits with a default impl, like `Sync`, should not be specialized
--> $DIR/suspicious-impls-lint.rs:46:1
|
LL | unsafe impl<T> Sync for WithLifetime<'static, Vec<T>> {}
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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>
= note: `Vec<T>` is not a generic parameter
note: try using the same sequence of generic parameters as the struct definition
--> $DIR/suspicious-impls-lint.rs:44:1
|
LL | pub struct WithLifetime<'a, T>(&'a (), T);
2022-02-13 09:27:59 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors