Add #![allow(dyn_drop)] to test cases with dyn Drop in them

These are all testing corner-cases in the compiler.
Adding a new warning broke these test cases, but --cap-lints stops
it from actually breaking things in production.
This commit is contained in:
Michael Howell 2021-07-03 11:52:19 -07:00
parent dbd4fd5716
commit 83d3a94b04
3 changed files with 5 additions and 3 deletions

View file

@ -10,6 +10,7 @@
// anything.
#![deny(rust_2018_compatibility)]
#![allow(dyn_drop)]
macro_rules! foo {
() => {

View file

@ -1,6 +1,7 @@
// check-pass
#![warn(order_dependent_trait_objects)]
#![allow(dyn_drop)]
// Check that traitobject 0.1.0 compiles

View file

@ -1,5 +1,5 @@
warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
--> $DIR/issue-33140-traitobject-crate.rs:85:1
--> $DIR/issue-33140-traitobject-crate.rs:86:1
|
LL | unsafe impl Trait for dyn (::std::marker::Send) + Sync { }
| ------------------------------------------------------ first implementation here
@ -15,7 +15,7 @@ LL | #![warn(order_dependent_trait_objects)]
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
--> $DIR/issue-33140-traitobject-crate.rs:88:1
--> $DIR/issue-33140-traitobject-crate.rs:89:1
|
LL | unsafe impl Trait for dyn (::std::marker::Send) + Send + Sync { }
| ------------------------------------------------------------- first implementation here
@ -27,7 +27,7 @@ LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send { }
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
--> $DIR/issue-33140-traitobject-crate.rs:92:1
--> $DIR/issue-33140-traitobject-crate.rs:93:1
|
LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send { }
| ------------------------------------------------------ first implementation here