diff options
| author | Michael Howell <michael@notriddle.com> | 2021-07-03 11:52:19 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2021-07-18 07:55:57 -0700 |
| commit | 83d3a94b0474ceac3ea1a0d1e7e968e0de7f1033 (patch) | |
| tree | b6ca5c94ce7931941fa700eeff659f94de03baab | |
| parent | dbd4fd5716fb53086e35aa5d1548f5f709e439a0 (diff) | |
| download | rust-83d3a94b0474ceac3ea1a0d1e7e968e0de7f1033.tar.gz rust-83d3a94b0474ceac3ea1a0d1e7e968e0de7f1033.zip | |
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.
3 files changed, 5 insertions, 3 deletions
diff --git a/src/test/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs b/src/test/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs index 2b46f57c2e2..59e7f9a6083 100644 --- a/src/test/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs +++ b/src/test/ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs @@ -10,6 +10,7 @@ // anything. #![deny(rust_2018_compatibility)] +#![allow(dyn_drop)] macro_rules! foo { () => { diff --git a/src/test/ui/traits/object/issue-33140-traitobject-crate.rs b/src/test/ui/traits/object/issue-33140-traitobject-crate.rs index 46b68f1c9fe..8abd92da362 100644 --- a/src/test/ui/traits/object/issue-33140-traitobject-crate.rs +++ b/src/test/ui/traits/object/issue-33140-traitobject-crate.rs @@ -1,6 +1,7 @@ // check-pass #![warn(order_dependent_trait_objects)] +#![allow(dyn_drop)] // Check that traitobject 0.1.0 compiles diff --git a/src/test/ui/traits/object/issue-33140-traitobject-crate.stderr b/src/test/ui/traits/object/issue-33140-traitobject-crate.stderr index 781decb5ae2..77d71360b80 100644 --- a/src/test/ui/traits/object/issue-33140-traitobject-crate.stderr +++ b/src/test/ui/traits/object/issue-33140-traitobject-crate.stderr @@ -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 |
