]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/ty/assoc.rs
Rollup merge of #107553 - edward-shen:edward-shen/suggest-null-ptr, r=WaffleLapkin
[rust.git] / compiler / rustc_middle / src / ty / assoc.rs
index bb7fba3ee7119ad9c00af8c9f4311bfd4d5c11b2..71cecfb558fb282c48055ff139d96fb399c88a07 100644 (file)
@@ -79,7 +79,7 @@ pub fn signature(&self, tcx: TyCtxt<'_>) -> String {
                 // late-bound regions, and we don't want method signatures to show up
                 // `as for<'r> fn(&'r MyType)`. Pretty-printing handles late-bound
                 // regions just fine, showing `fn(&MyType)`.
-                tcx.fn_sig(self.def_id).skip_binder().to_string()
+                tcx.fn_sig(self.def_id).subst_identity().skip_binder().to_string()
             }
             ty::AssocKind::Type => format!("type {};", self.name),
             ty::AssocKind::Const => {
@@ -130,7 +130,7 @@ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 /// done only on items with the same name.
 #[derive(Debug, Clone, PartialEq, HashStable)]
 pub struct AssocItems<'tcx> {
-    pub(super) items: SortedIndexMultiMap<u32, Symbol, &'tcx ty::AssocItem>,
+    items: SortedIndexMultiMap<u32, Symbol, &'tcx ty::AssocItem>,
 }
 
 impl<'tcx> AssocItems<'tcx> {