Skip to content

Rollup of 11 pull requests #143407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
19352e9
Add methods for converting bool to `Result<(), E>`
LimpSquid Jun 19, 2025
cda9bfe
Fix `x clean` with a fifo
ehuss Jul 1, 2025
ae0bef7
Remove fast path from codegen_select, since Sized has no methods
compiler-errors Jul 2, 2025
d3c0ef0
Use is_trivially_wf for ProvePredicate fast path
compiler-errors Jul 2, 2025
91c53c9
Consider polarity in sizedness fast path
compiler-errors Jul 2, 2025
9ce91f7
update coherence example
emmanuel-ferdman Jul 2, 2025
d9505f0
use unsigned_abs instead of `abs` on signed int to silence clippy
hkBst Jul 3, 2025
1c3454a
remove redundant #[must_use]
hkBst Jul 3, 2025
d3f2e2e
simplify receivers for some array method calls
hkBst Jul 3, 2025
3380bfd
Replace kw_span by full span.
cjgillot Jul 2, 2024
510e5d7
rustdoc: don't treat methods under const impls or traits as const
fee1-dead Jul 3, 2025
51857ad
Always use the pure Rust fallback instead of `llvm.{maximum,minimum}`
Urgau Jul 3, 2025
f5fbb2c
compiler: inline 1-2 query provide fn in hir_analysis and hir_typeck
workingjubilee Jul 3, 2025
3b7f9f9
compiler: document all provide fn in hir_analysis and hir_typeck
workingjubilee Jul 3, 2025
e080bc8
Rollup merge of #142749 - LimpSquid:bool_to_result, r=scottmcm
jhpratt Jul 4, 2025
826d4bc
Rollup merge of #143288 - ehuss:fix-clean-fifo, r=Kobzol
jhpratt Jul 4, 2025
9de211b
Rollup merge of #143307 - compiler-errors:fast-path-nitpicks, r=lcnr
jhpratt Jul 4, 2025
25eb325
Rollup merge of #143346 - emmanuel-ferdman:master, r=tshepang
jhpratt Jul 4, 2025
7c68a8d
Rollup merge of #143356 - hkBst:clippy-fix-2, r=scottmcm
jhpratt Jul 4, 2025
5adf3ef
Rollup merge of #143370 - hkBst:clippy-fix-4, r=tgross35
jhpratt Jul 4, 2025
e55514b
Rollup merge of #143378 - hkBst:clippy-fix-6, r=tgross35
jhpratt Jul 4, 2025
05f5690
Rollup merge of #143380 - cjgillot:kw_span, r=compiler-errors
jhpratt Jul 4, 2025
01fe1c0
Rollup merge of #143381 - fee1-dead-contrib:push-pzxuvlnymxpu, r=Guil…
jhpratt Jul 4, 2025
9852ace
Rollup merge of #143394 - workingjubilee:reorganize-hir-analysis-prov…
jhpratt Jul 4, 2025
e4e26d2
Rollup merge of #143395 - Urgau:llvm-fallback-minimum-maximum, r=tgro…
jhpratt Jul 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ pub enum GenericParamKind {
},
Const {
ty: P<Ty>,
/// Span of the `const` keyword.
kw_span: Span,
/// Span of the whole parameter definition, including default.
span: Span,
/// Optional default value for the const generic param.
default: Option<AnonConst>,
},
Expand All @@ -410,10 +410,7 @@ impl GenericParam {
self.ident.span
}
GenericParamKind::Type { default: Some(ty) } => self.ident.span.to(ty.span),
GenericParamKind::Const { kw_span, default: Some(default), .. } => {
kw_span.to(default.value.span)
}
GenericParamKind::Const { kw_span, default: None, ty } => kw_span.to(ty.span),
GenericParamKind::Const { span, .. } => *span,
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_ast/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1350,9 +1350,10 @@ macro_rules! common_visitor_and_walkers {
match kind {
GenericParamKind::Lifetime => (),
GenericParamKind::Type { default } => visit_opt!(vis, visit_ty, default),
GenericParamKind::Const { ty, default, kw_span: _ } => {
GenericParamKind::Const { ty, default, span } => {
try_visit!(vis.visit_ty(ty));
visit_opt!(vis, visit_anon_const, default);
try_visit!(visit_span(vis, span));
}
}
if let Some(sp) = colon_span {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {

(hir::ParamName::Plain(self.lower_ident(param.ident)), kind)
}
GenericParamKind::Const { ty, kw_span: _, default } => {
GenericParamKind::Const { ty, span: _, default } => {
let ty = self
.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::GenericDefault));

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast_passes/src/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,11 +909,11 @@ fn validate_generic_param_order(dcx: DiagCtxtHandle<'_>, generics: &[GenericPara
}
GenericParamKind::Type { default: None } => (),
GenericParamKind::Lifetime => (),
GenericParamKind::Const { ty: _, kw_span: _, default: Some(default) } => {
GenericParamKind::Const { ty: _, span: _, default: Some(default) } => {
ordered_params += " = ";
ordered_params += &pprust::expr_to_string(&default.value);
}
GenericParamKind::Const { ty: _, kw_span: _, default: None } => (),
GenericParamKind::Const { ty: _, span: _, default: None } => (),
}
first = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pub(crate) fn expand_deriving_coerce_pointee(
GenericParamKind::Type { default: _ } => {
cx.typaram(p.span(), p.ident, p.bounds.clone(), None)
}
GenericParamKind::Const { ty, kw_span: _, default: _ } => cx
GenericParamKind::Const { ty, span: _, default: _ } => cx
.const_param(
p.span(),
p.ident,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_builtin_macros/src/deriving/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,10 +664,10 @@ impl<'a> TraitDef<'a> {

cx.typaram(param.ident.span.with_ctxt(ctxt), param.ident, bounds, None)
}
GenericParamKind::Const { ty, kw_span, .. } => {
GenericParamKind::Const { ty, span, .. } => {
let const_nodefault_kind = GenericParamKind::Const {
ty: ty.clone(),
kw_span: kw_span.with_ctxt(ctxt),
span: span.with_ctxt(ctxt),

// We can't have default values inside impl block
default: None,
Expand Down
26 changes: 14 additions & 12 deletions compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,25 @@ fn call_simple_intrinsic<'ll, 'tcx>(
sym::minnumf64 => ("llvm.minnum", &[bx.type_f64()]),
sym::minnumf128 => ("llvm.minnum", &[bx.type_f128()]),

sym::minimumf16 => ("llvm.minimum", &[bx.type_f16()]),
sym::minimumf32 => ("llvm.minimum", &[bx.type_f32()]),
sym::minimumf64 => ("llvm.minimum", &[bx.type_f64()]),
// There are issues on x86_64 and aarch64 with the f128 variant,
// let's instead use the intrinsic fallback body.
// sym::minimumf128 => ("llvm.minimum", &[cx.type_f128()]),
// FIXME: LLVM currently mis-compile those intrinsics, re-enable them
// when llvm/llvm-project#{139380,139381,140445} are fixed.
//sym::minimumf16 => ("llvm.minimum", &[bx.type_f16()]),
//sym::minimumf32 => ("llvm.minimum", &[bx.type_f32()]),
//sym::minimumf64 => ("llvm.minimum", &[bx.type_f64()]),
//sym::minimumf128 => ("llvm.minimum", &[cx.type_f128()]),
//
sym::maxnumf16 => ("llvm.maxnum", &[bx.type_f16()]),
sym::maxnumf32 => ("llvm.maxnum", &[bx.type_f32()]),
sym::maxnumf64 => ("llvm.maxnum", &[bx.type_f64()]),
sym::maxnumf128 => ("llvm.maxnum", &[bx.type_f128()]),

sym::maximumf16 => ("llvm.maximum", &[bx.type_f16()]),
sym::maximumf32 => ("llvm.maximum", &[bx.type_f32()]),
sym::maximumf64 => ("llvm.maximum", &[bx.type_f64()]),
// There are issues on x86_64 and aarch64 with the f128 variant,
// let's instead use the intrinsic fallback body.
// sym::maximumf128 => ("llvm.maximum", &[cx.type_f128()]),
// FIXME: LLVM currently mis-compile those intrinsics, re-enable them
// when llvm/llvm-project#{139380,139381,140445} are fixed.
//sym::maximumf16 => ("llvm.maximum", &[bx.type_f16()]),
//sym::maximumf32 => ("llvm.maximum", &[bx.type_f32()]),
//sym::maximumf64 => ("llvm.maximum", &[bx.type_f64()]),
//sym::maximumf128 => ("llvm.maximum", &[cx.type_f128()]),
//
sym::copysignf16 => ("llvm.copysign", &[bx.type_f16()]),
sym::copysignf32 => ("llvm.copysign", &[bx.type_f32()]),
sym::copysignf64 => ("llvm.copysign", &[bx.type_f64()]),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl<'a> ExtCtxt<'a> {
attrs: AttrVec::new(),
bounds,
is_placeholder: false,
kind: ast::GenericParamKind::Const { ty, kw_span: DUMMY_SP, default },
kind: ast::GenericParamKind::Const { ty, span: DUMMY_SP, default },
colon_span: None,
}
}
Expand Down
6 changes: 4 additions & 2 deletions compiler/rustc_hir_analysis/src/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,17 @@ use self::compare_impl_item::collect_return_position_impl_trait_in_trait_tys;
use self::region::region_scope_tree;
use crate::{errors, require_c_abi_if_c_variadic};

pub fn provide(providers: &mut Providers) {
wfcheck::provide(providers);
/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub(super) fn provide(providers: &mut Providers) {
*providers = Providers {
adt_destructor,
adt_async_destructor,
region_scope_tree,
collect_return_position_impl_trait_in_trait_tys,
compare_impl_item: compare_impl_item::compare_impl_item,
check_coroutine_obligations: check::check_coroutine_obligations,
check_type_wf: wfcheck::check_type_wf,
check_well_formed: wfcheck::check_well_formed,
..*providers
};
}
Expand Down
12 changes: 5 additions & 7 deletions compiler/rustc_hir_analysis/src/check/wfcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use rustc_infer::infer::{self, InferCtxt, SubregionOrigin, TyCtxtInferExt};
use rustc_lint_defs::builtin::SUPERTRAIT_ITEM_SHADOWING_DEFINITION;
use rustc_macros::LintDiagnostic;
use rustc_middle::mir::interpret::ErrorHandled;
use rustc_middle::query::Providers;
use rustc_middle::traits::solve::NoSolution;
use rustc_middle::ty::trait_def::TraitSpecializationKind;
use rustc_middle::ty::{
Expand Down Expand Up @@ -189,7 +188,10 @@ where
}
}

fn check_well_formed(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), ErrorGuaranteed> {
pub(super) fn check_well_formed(
tcx: TyCtxt<'_>,
def_id: LocalDefId,
) -> Result<(), ErrorGuaranteed> {
let mut res = crate::check::check::check_item_type(tcx, def_id);

for param in &tcx.generics_of(def_id).own_params {
Expand Down Expand Up @@ -2249,7 +2251,7 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
}
}

fn check_type_wf(tcx: TyCtxt<'_>, (): ()) -> Result<(), ErrorGuaranteed> {
pub(super) fn check_type_wf(tcx: TyCtxt<'_>, (): ()) -> Result<(), ErrorGuaranteed> {
let items = tcx.hir_crate_items(());
let res = items
.par_items(|item| tcx.ensure_ok().check_well_formed(item.owner_id.def_id))
Expand Down Expand Up @@ -2397,7 +2399,3 @@ struct RedundantLifetimeArgsLint<'tcx> {
// The lifetime we can replace the victim with.
candidate: ty::Region<'tcx>,
}

pub fn provide(providers: &mut Providers) {
*providers = Providers { check_type_wf, check_well_formed, ..*providers };
}
7 changes: 1 addition & 6 deletions compiler/rustc_hir_analysis/src/check_unused.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
use rustc_data_structures::unord::{ExtendUnord, UnordSet};
use rustc_hir::def::DefKind;
use rustc_hir::def_id::LocalDefId;
use rustc_middle::query::Providers;
use rustc_middle::ty::TyCtxt;
use rustc_session::lint;
use tracing::debug;

pub(crate) fn provide(providers: &mut Providers) {
*providers = Providers { check_unused_traits, ..*providers };
}

fn check_unused_traits(tcx: TyCtxt<'_>, (): ()) {
pub(super) fn check_unused_traits(tcx: TyCtxt<'_>, (): ()) {
let mut used_trait_imports = UnordSet::<LocalDefId>::default();

// FIXME: Use `tcx.hir_par_body_owners()` when we implement creating `DefId`s
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_hir_analysis/src/coherence/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ fn enforce_empty_impls_for_marker_traits(
.emit())
}

/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`].
pub(crate) fn provide(providers: &mut Providers) {
use self::builtin::coerce_unsized_info;
use self::inherent_impls::{
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_hir_analysis/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ mod type_of;

///////////////////////////////////////////////////////////////////////////

/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub(crate) fn provide(providers: &mut Providers) {
resolve_bound_vars::provide(providers);
*providers = Providers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ enum BinderScopeType {

type ScopeRef<'a> = &'a Scope<'a>;

/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub(crate) fn provide(providers: &mut Providers) {
*providers = Providers {
resolve_bound_vars,
Expand Down
7 changes: 1 addition & 6 deletions compiler/rustc_hir_analysis/src/hir_wf_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@ use rustc_hir::{self as hir, AmbigArg, ForeignItem, ForeignItemKind};
use rustc_infer::infer::TyCtxtInferExt;
use rustc_infer::traits::{ObligationCause, ObligationCauseCode, WellFormedLoc};
use rustc_middle::bug;
use rustc_middle::query::Providers;
use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt, TypingMode, fold_regions};
use rustc_span::def_id::LocalDefId;
use rustc_trait_selection::traits::{self, ObligationCtxt};
use tracing::debug;

use crate::collect::ItemCtxt;

pub(crate) fn provide(providers: &mut Providers) {
*providers = Providers { diagnostic_hir_wf_check, ..*providers };
}

// Ideally, this would be in `rustc_trait_selection`, but we
// need access to `ItemCtxt`
fn diagnostic_hir_wf_check<'tcx>(
pub(super) fn diagnostic_hir_wf_check<'tcx>(
tcx: TyCtxt<'tcx>,
(predicate, loc): (ty::Predicate<'tcx>, WellFormedLoc),
) -> Option<ObligationCause<'tcx>> {
Expand Down
11 changes: 7 additions & 4 deletions compiler/rustc_hir_analysis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,21 @@ fn require_c_abi_if_c_variadic(
.emit();
}

/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub fn provide(providers: &mut Providers) {
collect::provide(providers);
coherence::provide(providers);
check::provide(providers);
check_unused::provide(providers);
variance::provide(providers);
outlives::provide(providers);
hir_wf_check::provide(providers);
*providers = Providers {
check_unused_traits: check_unused::check_unused_traits,
diagnostic_hir_wf_check: hir_wf_check::diagnostic_hir_wf_check,
inferred_outlives_crate: outlives::inferred_outlives_crate,
inferred_outlives_of: outlives::inferred_outlives_of,
inherit_sig_for_delegation_item: delegation::inherit_sig_for_delegation_item,
enforce_impl_non_lifetime_params_are_constrained:
impl_wf_check::enforce_impl_non_lifetime_params_are_constrained,
crate_variances: variance::crate_variances,
variances_of: variance::variances_of,
..*providers
};
}
Expand Down
12 changes: 5 additions & 7 deletions compiler/rustc_hir_analysis/src/outlives/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use rustc_hir::def::DefKind;
use rustc_hir::def_id::LocalDefId;
use rustc_middle::query::Providers;
use rustc_middle::ty::{self, CratePredicatesMap, GenericArgKind, TyCtxt, Upcast};
use rustc_span::Span;

Expand All @@ -9,11 +8,10 @@ mod explicit;
mod implicit_infer;
mod utils;

pub(crate) fn provide(providers: &mut Providers) {
*providers = Providers { inferred_outlives_of, inferred_outlives_crate, ..*providers };
}

fn inferred_outlives_of(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[(ty::Clause<'_>, Span)] {
pub(super) fn inferred_outlives_of(
tcx: TyCtxt<'_>,
item_def_id: LocalDefId,
) -> &[(ty::Clause<'_>, Span)] {
match tcx.def_kind(item_def_id) {
DefKind::Struct | DefKind::Enum | DefKind::Union => {
let crate_map = tcx.inferred_outlives_crate(());
Expand Down Expand Up @@ -48,7 +46,7 @@ fn inferred_outlives_of(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[(ty::Clau
}
}

fn inferred_outlives_crate(tcx: TyCtxt<'_>, (): ()) -> CratePredicatesMap<'_> {
pub(super) fn inferred_outlives_crate(tcx: TyCtxt<'_>, (): ()) -> CratePredicatesMap<'_> {
// Compute a map from each ADT (struct/enum/union) and lazy type alias to
// the **explicit** outlives predicates (`T: 'a`, `'a: 'b`) that the user wrote.
// Typically there won't be many of these, except in older code where
Expand Down
9 changes: 2 additions & 7 deletions compiler/rustc_hir_analysis/src/variance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use rustc_arena::DroplessArena;
use rustc_hir as hir;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_middle::query::Providers;
use rustc_middle::span_bug;
use rustc_middle::ty::{
self, CrateVariancesMap, GenericArgsRef, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable,
Expand All @@ -27,18 +26,14 @@ mod solve;

pub(crate) mod dump;

pub(crate) fn provide(providers: &mut Providers) {
*providers = Providers { variances_of, crate_variances, ..*providers };
}

fn crate_variances(tcx: TyCtxt<'_>, (): ()) -> CrateVariancesMap<'_> {
pub(super) fn crate_variances(tcx: TyCtxt<'_>, (): ()) -> CrateVariancesMap<'_> {
let arena = DroplessArena::default();
let terms_cx = terms::determine_parameters_to_be_inferred(tcx, &arena);
let constraints_cx = constraints::add_constraints_from_crate(terms_cx);
solve::solve_constraints(constraints_cx)
}

fn variances_of(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Variance] {
pub(super) fn variances_of(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Variance] {
// Skip items with no generics - there's nothing to infer in them.
if tcx.generics_of(item_def_id).is_empty() {
return &[];
Expand Down
9 changes: 7 additions & 2 deletions compiler/rustc_hir_typeck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,12 @@ fn fatally_break_rust(tcx: TyCtxt<'_>, span: Span) -> ! {
diag.emit()
}

/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
pub fn provide(providers: &mut Providers) {
method::provide(providers);
*providers = Providers { typeck, used_trait_imports, ..*providers };
*providers = Providers {
method_autoderef_steps: method::probe::method_autoderef_steps,
typeck,
used_trait_imports,
..*providers
};
}
5 changes: 0 additions & 5 deletions compiler/rustc_hir_typeck/src/method/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use rustc_hir::def::{CtorOf, DefKind, Namespace};
use rustc_hir::def_id::DefId;
use rustc_infer::infer::{BoundRegionConversionTime, InferOk};
use rustc_infer::traits::PredicateObligations;
use rustc_middle::query::Providers;
use rustc_middle::traits::ObligationCause;
use rustc_middle::ty::{
self, GenericArgs, GenericArgsRef, GenericParamDefKind, Ty, TypeVisitableExt,
Expand All @@ -28,10 +27,6 @@ pub(crate) use self::MethodError::*;
use self::probe::{IsSuggestion, ProbeScope};
use crate::FnCtxt;

pub(crate) fn provide(providers: &mut Providers) {
probe::provide(providers);
}

#[derive(Clone, Copy, Debug)]
pub(crate) struct MethodCallee<'tcx> {
/// Impl method ID, for inherent methods, or trait method ID, otherwise.
Expand Down
7 changes: 1 addition & 6 deletions compiler/rustc_hir_typeck/src/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use rustc_infer::infer::canonical::{Canonical, OriginalQueryValues, QueryRespons
use rustc_infer::infer::{BoundRegionConversionTime, DefineOpaqueTypes, InferOk, TyCtxtInferExt};
use rustc_infer::traits::ObligationCauseCode;
use rustc_middle::middle::stability;
use rustc_middle::query::Providers;
use rustc_middle::ty::elaborate::supertrait_def_ids;
use rustc_middle::ty::fast_reject::{DeepRejectCtxt, TreatParams, simplify_type};
use rustc_middle::ty::{
Expand Down Expand Up @@ -554,11 +553,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}
}

pub(crate) fn provide(providers: &mut Providers) {
providers.method_autoderef_steps = method_autoderef_steps;
}

fn method_autoderef_steps<'tcx>(
pub(crate) fn method_autoderef_steps<'tcx>(
tcx: TyCtxt<'tcx>,
goal: CanonicalTyGoal<'tcx>,
) -> MethodAutoderefStepsResult<'tcx> {
Expand Down
Loading
Loading