about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
diff options
context:
space:
mode:
authorLukas Markeffsky <@>2024-02-06 20:03:49 +0100
committerLukas Markeffsky <@>2024-02-06 20:03:49 +0100
commit15ffe839bacebb2883fd77959df319eebefaf8cf (patch)
treeae63b3f50bba75d0d3417a1acdc6ef4a232547bc /compiler/rustc_trait_selection/src/traits
parent42cc1d2f974f1db27608356c556ec5286400a58a (diff)
downloadrust-15ffe839bacebb2883fd77959df319eebefaf8cf.tar.gz
rust-15ffe839bacebb2883fd77959df319eebefaf8cf.zip
add fixme
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
-rw-r--r--compiler/rustc_trait_selection/src/traits/project.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs
index 33298c4b750..ecaab0e0085 100644
--- a/compiler/rustc_trait_selection/src/traits/project.rs
+++ b/compiler/rustc_trait_selection/src/traits/project.rs
@@ -2302,9 +2302,10 @@ fn confirm_builtin_candidate<'cx, 'tcx>(
         };
         let metadata_ty = self_ty.ptr_metadata_ty_or_tail(tcx, normalize).unwrap_or_else(|tail| {
             if tail == self_ty {
-                // This is the fallback case for type parameters, unnormalizable projections
-                // and opaque types.
-                // If the `self_ty` is `Sized`, then the metadata is `()`.
+                // This is the "fallback impl" for type parameters, unnormalizable projections
+                // and opaque types: If the `self_ty` is `Sized`, then the metadata is `()`.
+                // FIXME(ptr_metadata): This impl overlaps with the other impls and shouldn't
+                // exist. Instead, `Pointee<Metadata = ()>` should be a supertrait of `Sized`.
                 let sized_predicate = ty::TraitRef::from_lang_item(
                     tcx,
                     LangItem::Sized,