order_dependent_trait_objects
to ReportNow
This commit is contained in:
parent
1536ab1b38
commit
a5e116e95f
4 changed files with 113 additions and 0 deletions
|
@ -1427,6 +1427,7 @@ declare_lint! {
|
||||||
"trait-object types were treated as different depending on marker-trait order",
|
"trait-object types were treated as different depending on marker-trait order",
|
||||||
@future_incompatible = FutureIncompatibleInfo {
|
@future_incompatible = FutureIncompatibleInfo {
|
||||||
reference: "issue #56484 <https://github.com/rust-lang/rust/issues/56484>",
|
reference: "issue #56484 <https://github.com/rust-lang/rust/issues/56484>",
|
||||||
|
reason: FutureIncompatibilityReason::FutureReleaseErrorReportNow,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,3 +37,45 @@ LL | impl Foo for dyn Send + Sync + Send {}
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
Future incompatibility report: Future breakage diagnostic:
|
||||||
|
error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + 'static)`: (E0119)
|
||||||
|
--> $DIR/lint-incoherent-auto-trait-objects.rs:5:1
|
||||||
|
|
|
||||||
|
LL | impl Foo for dyn Send {}
|
||||||
|
| --------------------- first implementation here
|
||||||
|
LL |
|
||||||
|
LL | impl Foo for dyn Send + Send {}
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)`
|
||||||
|
|
|
||||||
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||||
|
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||||
|
= note: `#[deny(order_dependent_trait_objects)]` on by default
|
||||||
|
|
||||||
|
Future breakage diagnostic:
|
||||||
|
error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
|
||||||
|
--> $DIR/lint-incoherent-auto-trait-objects.rs:11:1
|
||||||
|
|
|
||||||
|
LL | impl Foo for dyn Send + Sync {}
|
||||||
|
| ---------------------------- first implementation here
|
||||||
|
LL |
|
||||||
|
LL | impl Foo for dyn Sync + Send {}
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
|
||||||
|
|
|
||||||
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||||
|
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||||
|
= note: `#[deny(order_dependent_trait_objects)]` on by default
|
||||||
|
|
||||||
|
Future breakage diagnostic:
|
||||||
|
error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
|
||||||
|
--> $DIR/lint-incoherent-auto-trait-objects.rs:15:1
|
||||||
|
|
|
||||||
|
LL | impl Foo for dyn Sync + Send {}
|
||||||
|
| ---------------------------- first implementation here
|
||||||
|
...
|
||||||
|
LL | impl Foo for dyn Send + Sync + Send {}
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
|
||||||
|
|
|
||||||
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||||
|
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||||
|
= note: `#[deny(order_dependent_trait_objects)]` on by default
|
||||||
|
|
||||||
|
|
|
@ -66,3 +66,20 @@ error: aborting due to 8 previous errors
|
||||||
|
|
||||||
Some errors have detailed explanations: E0119, E0751.
|
Some errors have detailed explanations: E0119, E0751.
|
||||||
For more information about an error, try `rustc --explain E0119`.
|
For more information about an error, try `rustc --explain E0119`.
|
||||||
|
Future incompatibility report: Future breakage diagnostic:
|
||||||
|
warning: conflicting implementations of trait `Trait0` for type `(dyn std::marker::Send + 'static)`: (E0119)
|
||||||
|
--> $DIR/issue-33140-hack-boundaries.rs:10:1
|
||||||
|
|
|
||||||
|
LL | impl Trait0 for dyn Send {}
|
||||||
|
| ------------------------ first implementation here
|
||||||
|
LL | impl Trait0 for dyn Send {}
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)`
|
||||||
|
|
|
||||||
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||||
|
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/issue-33140-hack-boundaries.rs:2:10
|
||||||
|
|
|
||||||
|
LL | #![allow(order_dependent_trait_objects)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
|
@ -40,3 +40,56 @@ LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send + Sync { }
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
warning: 3 warnings emitted
|
||||||
|
|
||||||
|
Future incompatibility report: Future breakage diagnostic:
|
||||||
|
warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
|
||||||
|
--> $DIR/issue-33140-traitobject-crate.rs:86:1
|
||||||
|
|
|
||||||
|
LL | unsafe impl Trait for dyn (::std::marker::Send) + Sync { }
|
||||||
|
| ------------------------------------------------------ first implementation here
|
||||||
|
LL | unsafe impl Trait for dyn (::std::marker::Send) + Send + Sync { }
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
|
||||||
|
|
|
||||||
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||||
|
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/issue-33140-traitobject-crate.rs:3:9
|
||||||
|
|
|
||||||
|
LL | #![warn(order_dependent_trait_objects)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Future breakage diagnostic:
|
||||||
|
warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
|
||||||
|
--> $DIR/issue-33140-traitobject-crate.rs:89:1
|
||||||
|
|
|
||||||
|
LL | unsafe impl Trait for dyn (::std::marker::Send) + Send + Sync { }
|
||||||
|
| ------------------------------------------------------------- first implementation here
|
||||||
|
...
|
||||||
|
LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send { }
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
|
||||||
|
|
|
||||||
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||||
|
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/issue-33140-traitobject-crate.rs:3:9
|
||||||
|
|
|
||||||
|
LL | #![warn(order_dependent_trait_objects)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Future breakage diagnostic:
|
||||||
|
warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
|
||||||
|
--> $DIR/issue-33140-traitobject-crate.rs:93:1
|
||||||
|
|
|
||||||
|
LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send { }
|
||||||
|
| ------------------------------------------------------ first implementation here
|
||||||
|
...
|
||||||
|
LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send + Sync { }
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)`
|
||||||
|
|
|
||||||
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||||
|
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/issue-33140-traitobject-crate.rs:3:9
|
||||||
|
|
|
||||||
|
LL | #![warn(order_dependent_trait_objects)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue