1
Fork 0

Auto merge of #63463 - matthewjasper:ty_param_cleanup, r=petrochenkov

Don't special case the `Self` parameter by name

This results in a couple of small diagnostic regressions. They could be avoided by keeping the special case just for diagnostics, but that seems worse.

closes #50125
cc #60869
This commit is contained in:
bors 2019-08-19 01:31:35 +00:00
commit a807902dd6
24 changed files with 124 additions and 183 deletions

View file

@ -2303,7 +2303,7 @@ impl Clean<Item> for ty::AssocItem {
ty::ImplContainer(def_id) => {
cx.tcx.type_of(def_id)
}
ty::TraitContainer(_) => cx.tcx.mk_self_type()
ty::TraitContainer(_) => cx.tcx.types.self_param,
};
let self_arg_ty = *sig.input(0).skip_binder();
if self_arg_ty == self_ty {