Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/method_resolution/probe.rs')
| -rw-r--r-- | crates/hir-ty/src/method_resolution/probe.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/hir-ty/src/method_resolution/probe.rs b/crates/hir-ty/src/method_resolution/probe.rs index 3604076ccd..afdc62183e 100644 --- a/crates/hir-ty/src/method_resolution/probe.rs +++ b/crates/hir-ty/src/method_resolution/probe.rs @@ -315,7 +315,7 @@ impl<'a, 'db> MethodResolutionContext<'a, 'db> { // ambiguous. if let Some(bad_ty) = &steps.opt_bad_ty { if bad_ty.reached_raw_pointer - && !self.unstable_features.arbitrary_self_types_pointers + && !self.features.arbitrary_self_types_pointers && self.edition.at_least_2018() { // this case used to be allowed by the compiler, @@ -404,8 +404,8 @@ impl<'a, 'db> MethodResolutionContext<'a, 'db> { Autoderef::new(infcx, self.param_env, self_ty).include_raw_pointers(); let mut reached_raw_pointer = false; - let arbitrary_self_types_enabled = self.unstable_features.arbitrary_self_types - || self.unstable_features.arbitrary_self_types_pointers; + let arbitrary_self_types_enabled = + self.features.arbitrary_self_types || self.features.arbitrary_self_types_pointers; let (mut steps, reached_recursion_limit) = if arbitrary_self_types_enabled { let reachable_via_deref = autoderef_via_deref.by_ref().map(|_| true).chain(std::iter::repeat(false)); @@ -613,7 +613,7 @@ impl<'db> ProbeChoice<'db> for ProbeForNameChoice<'db> { // We collapse to a subtrait pick *after* filtering unstable candidates // to make sure we don't prefer a unstable subtrait method over a stable // supertrait method. - if this.ctx.unstable_features.supertrait_item_shadowing + if this.ctx.features.supertrait_item_shadowing && let Some(pick) = this.collapse_candidates_to_subtrait_pick(self_ty, &applicable_candidates) { @@ -1183,8 +1183,8 @@ impl<'a, 'db> ProbeContext<'a, 'db, ProbeForNameChoice<'db>> { // The errors emitted by this function are part of // the arbitrary self types work, and should not impact // other users. - if !self.ctx.unstable_features.arbitrary_self_types - && !self.ctx.unstable_features.arbitrary_self_types_pointers + if !self.ctx.features.arbitrary_self_types + && !self.ctx.features.arbitrary_self_types_pointers { return Ok(()); } |