Skip to content

Commit

Permalink
note that methods should only be used for diags
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jun 8, 2022
1 parent f8e73ed commit b7ab477
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_middle/src/ty/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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>],
Expand Down

0 comments on commit b7ab477

Please sign in to comment.