Skip to content

Commit b7ab477

Browse files
committed
note that methods should only be used for diags
1 parent f8e73ed commit b7ab477

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_middle/src/ty/generics.rs

+4
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ impl<'tcx> Generics {
230230

231231
/// Returns the substs corresponding to the generic parameters
232232
/// of this item, excluding `Self`.
233+
///
234+
/// **This should only be used for diagnostics purposes.**
233235
pub fn own_substs_no_defaults(
234236
&'tcx self,
235237
tcx: TyCtxt<'tcx>,
@@ -261,6 +263,8 @@ impl<'tcx> Generics {
261263
}
262264

263265
/// Returns the substs corresponding to the generic parameters of this item, excluding `Self`.
266+
///
267+
/// **This should only be used for diagnostics purposes.**
264268
pub fn own_substs(
265269
&'tcx self,
266270
substs: &'tcx [ty::GenericArg<'tcx>],

0 commit comments

Comments
 (0)