]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/dropck.rs
Add 'compiler/rustc_smir/' from commit '9abcb5c7b574cf316eb23d3f469187bb86ba3019'
[rust.git] / compiler / rustc_typeck / src / check / dropck.rs
index 0b0f7a085fcba4347e467dd3af4226733deb50df..307064327c5a35bf804de8d0e42aaba93af0cd5b 100644 (file)
@@ -5,6 +5,7 @@
 use rustc_middle::ty::error::TypeError;
 use rustc_middle::ty::relate::{Relate, RelateResult, TypeRelation};
 use rustc_middle::ty::subst::SubstsRef;
+use rustc_middle::ty::util::IgnoreRegions;
 use rustc_middle::ty::{self, Predicate, Ty, TyCtxt};
 use rustc_span::Span;
 use rustc_trait_selection::traits::query::dropck_outlives::AtExt;
@@ -66,7 +67,7 @@ fn ensure_drop_params_and_item_params_correspond<'tcx>(
     self_type_did: DefId,
     drop_impl_substs: SubstsRef<'tcx>,
 ) -> Result<(), ErrorGuaranteed> {
-    let Err(arg) = tcx.uses_unique_generic_params(drop_impl_substs, false) else {
+    let Err(arg) = tcx.uses_unique_generic_params(drop_impl_substs, IgnoreRegions::No) else {
         return Ok(())
     };
 
@@ -86,7 +87,7 @@ fn ensure_drop_params_and_item_params_correspond<'tcx>(
     err.span_note(
         item_span,
         &format!(
-            "use the same sequence of generic type, lifetime and const parameters \
+            "use the same sequence of generic lifetime, type and const parameters \
                      as the {self_descr} definition",
         ),
     );
@@ -230,7 +231,7 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
 /// This function is not only checking that the dropck obligations are met for
 /// the given type, but it's also currently preventing non-regular recursion in
 /// types from causing stack overflows (dropck_no_diverge_on_nonregular_*.rs).
-crate fn check_drop_obligations<'a, 'tcx>(
+pub(crate) fn check_drop_obligations<'a, 'tcx>(
     rcx: &mut RegionCtxt<'a, 'tcx>,
     ty: Ty<'tcx>,
     span: Span,
@@ -247,7 +248,7 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>(
 // This is an implementation of the TypeRelation trait with the
 // aim of simply comparing for equality (without side-effects).
 // It is not intended to be used anywhere else other than here.
-crate struct SimpleEqRelation<'tcx> {
+pub(crate) struct SimpleEqRelation<'tcx> {
     tcx: TyCtxt<'tcx>,
     param_env: ty::ParamEnv<'tcx>,
 }