diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-02-01 16:08:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-01 16:08:05 +0100 |
| commit | 724ce3798fcbc81e67edcacc0944950f74435653 (patch) | |
| tree | 7671c41b339bdf77fef35761c6049331c67c18e9 /compiler/rustc_mir_transform/src | |
| parent | eb01fe85f721bb669305ff30cb0081d15495919f (diff) | |
| parent | 7ebd48d0061335d5c797a735721d0b16b322df6c (diff) | |
| download | rust-724ce3798fcbc81e67edcacc0944950f74435653.tar.gz rust-724ce3798fcbc81e67edcacc0944950f74435653.zip | |
Rollup merge of #93290 - lcnr:same_type, r=jackh726
remove `TyS::same_type` This function ignored regions and constants in adts, but didn't do so for references or any other types. cc https://github.com/rust-lang/rust/pull/93148#discussion_r791408057
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/function_item_references.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/function_item_references.rs b/compiler/rustc_mir_transform/src/function_item_references.rs index 1b9fddec2be..2ed14b91778 100644 --- a/compiler/rustc_mir_transform/src/function_item_references.rs +++ b/compiler/rustc_mir_transform/src/function_item_references.rs @@ -6,7 +6,7 @@ use rustc_middle::mir::*; use rustc_middle::ty::{ self, subst::{GenericArgKind, Subst, SubstsRef}, - PredicateKind, Ty, TyCtxt, TyS, + PredicateKind, Ty, TyCtxt, }; use rustc_session::lint::builtin::FUNCTION_ITEM_REFERENCES; use rustc_span::{symbol::sym, Span}; @@ -88,7 +88,7 @@ impl<'tcx> FunctionItemRefChecker<'_, 'tcx> { for generic_inner_ty in arg_def.walk() { if let GenericArgKind::Type(inner_ty) = generic_inner_ty.unpack() { // If the inner type matches the type bound by `Pointer` - if TyS::same_type(inner_ty, bound_ty) { + if inner_ty == bound_ty { // Do a substitution using the parameters from the callsite let subst_ty = inner_ty.subst(self.tcx, substs_ref); if let Some((fn_id, fn_substs)) = |
