]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
Foreign types are trivially drop
[rust.git] / compiler / rustc_trait_selection / src / traits / select / candidate_assembly.rs
index 77db3bd2692cc0898075b421c9fdcabd70ea026b..0099fba92004245912974c0974b5ac2002dc51c6 100644 (file)
@@ -932,7 +932,6 @@ fn assemble_const_drop_candidates(
             | ty::Bound(..)
             | ty::Param(_)
             | ty::Placeholder(_)
-            | ty::Foreign(_)
             | ty::Projection(_) => {
                 // We don't know if these are `~const Drop`, at least
                 // not structurally... so don't push a candidate.
@@ -951,6 +950,7 @@ fn assemble_const_drop_candidates(
             | ty::FnDef(..)
             | ty::FnPtr(_)
             | ty::Never
+            | ty::Foreign(_)
             | ty::Array(..)
             | ty::Slice(_)
             | ty::Closure(..)