diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-10-09 18:37:30 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-10-10 00:57:59 +0200 |
| commit | 2e7a52b22fe222316a48093547f6312252c20f0f (patch) | |
| tree | c1aab442574ea993272f51283a925a48651f3540 /compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs | |
| parent | 62b24ea7c53aec6f8176fed05d0acee926b76bdb (diff) | |
| download | rust-2e7a52b22fe222316a48093547f6312252c20f0f.tar.gz rust-2e7a52b22fe222316a48093547f6312252c20f0f.zip | |
Rename feature object_safe_for_dispatch to dyn_compatible_for_dispatch
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs index 191eda4d347..45e7de942fb 100644 --- a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs +++ b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs @@ -639,8 +639,8 @@ fn object_ty_for_trait<'tcx>( /// contained by the trait object, because the object that needs to be coerced is behind /// a pointer. /// -/// In practice, we cannot use `dyn Trait` explicitly in the obligation because it would result -/// in a new check that `Trait` is dyn-compatible, creating a cycle (until object_safe_for_dispatch +/// In practice, we cannot use `dyn Trait` explicitly in the obligation because it would result in +/// a new check that `Trait` is dyn-compatible, creating a cycle (until dyn_compatible_for_dispatch /// is stabilized, see tracking issue <https://github.com/rust-lang/rust/issues/43561>). /// Instead, we fudge a little by introducing a new type parameter `U` such that /// `Self: Unsize<U>` and `U: Trait + ?Sized`, and use `U` in place of `dyn Trait`. @@ -674,7 +674,7 @@ fn receiver_is_dispatchable<'tcx>( // the type `U` in the query // use a bogus type parameter to mimic a forall(U) query using u32::MAX for now. - // FIXME(mikeyhew) this is a total hack. Once object_safe_for_dispatch is stabilized, we can + // FIXME(mikeyhew) this is a total hack. Once dyn_compatible_for_dispatch is stabilized, we can // replace this with `dyn Trait` let unsized_self_ty: Ty<'tcx> = Ty::new_param(tcx, u32::MAX, Symbol::intern("RustaceansAreAwesome")); |
