Dejargnonize subst
This commit is contained in:
parent
084ce5bdb5
commit
3856df059e
128 changed files with 574 additions and 541 deletions
|
@ -801,7 +801,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), _)
|
||||
|
@ -812,7 +812,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)
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue