1
Fork 0

Rollup merge of #120958 - ShoyuVanilla:remove-subst, r=oli-obk

Dejargonize `subst`

In favor of #110793, replace almost every occurence of `subst` and `substitution` from rustc codes, but they still remains in subtrees under `src/tools/` like clippy and test codes (I'd like to replace them after this)
This commit is contained in:
Matthias Krüger 2024-02-12 23:18:54 +01:00 committed by GitHub
commit cb0d74be28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
130 changed files with 576 additions and 543 deletions

View file

@ -811,7 +811,7 @@ impl<'tcx> Cx<'tcx> {
let user_provided_type = match res {
// A reference to something callable -- e.g., a fn, method, or
// a tuple-struct or tuple-variant. This has the type of a
// `Fn` but with the user-given substitutions.
// `Fn` but with the user-given generic parameters.
Res::Def(DefKind::Fn, _)
| Res::Def(DefKind::AssocFn, _)
| Res::Def(DefKind::Ctor(_, CtorKind::Fn), _)
@ -822,7 +822,7 @@ impl<'tcx> Cx<'tcx> {
// A unit struct/variant which is used as a value (e.g.,
// `None`). This has the type of the enum/struct that defines
// this variant -- but with the substitutions given by the
// this variant -- but with the generic parameters given by the
// user.
Res::Def(DefKind::Ctor(_, CtorKind::Const), _) => {
self.user_args_applied_to_ty_of_hir_id(hir_id).map(Box::new)

View file

@ -7,7 +7,7 @@ pub(crate) trait UserAnnotatedTyHelpers<'tcx> {
fn typeck_results(&self) -> &ty::TypeckResults<'tcx>;
/// Looks up the type associated with this hir-id and applies the
/// user-given substitutions; the hir-id must map to a suitable
/// user-given generic parameters; the hir-id must map to a suitable
/// type.
fn user_args_applied_to_ty_of_hir_id(
&self,