From b7ab4777b2b09d50fa1c1d9c735e2f31ec5f8960 Mon Sep 17 00:00:00 2001 From: lcnr Date: Wed, 8 Jun 2022 10:01:35 +0200 Subject: [PATCH] note that methods should only be used for diags --- compiler/rustc_middle/src/ty/generics.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/rustc_middle/src/ty/generics.rs b/compiler/rustc_middle/src/ty/generics.rs index 5b0b56933ec..5fff840c39e 100644 --- a/compiler/rustc_middle/src/ty/generics.rs +++ b/compiler/rustc_middle/src/ty/generics.rs @@ -230,6 +230,8 @@ impl<'tcx> Generics { /// Returns the substs corresponding to the generic parameters /// of this item, excluding `Self`. + /// + /// **This should only be used for diagnostics purposes.** pub fn own_substs_no_defaults( &'tcx self, tcx: TyCtxt<'tcx>, @@ -261,6 +263,8 @@ impl<'tcx> Generics { } /// Returns the substs corresponding to the generic parameters of this item, excluding `Self`. + /// + /// **This should only be used for diagnostics purposes.** pub fn own_substs( &'tcx self, substs: &'tcx [ty::GenericArg<'tcx>],