Special case 'generic param from outer item' message for Self
This commit is contained in:
parent
511bf6e1c7
commit
2cfc81766c
8 changed files with 20 additions and 11 deletions
|
@ -568,12 +568,14 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
DefKind::Const => Some(errs::GenericParamsFromOuterItemStaticOrConst::Const),
|
||||
_ => None,
|
||||
};
|
||||
let is_self = matches!(outer_res, Res::SelfTyParam { .. } | Res::SelfTyAlias { .. });
|
||||
let mut err = errs::GenericParamsFromOuterItem {
|
||||
span,
|
||||
label: None,
|
||||
refer_to_type_directly: None,
|
||||
sugg: None,
|
||||
static_or_const,
|
||||
is_self,
|
||||
};
|
||||
|
||||
let sm = self.tcx.sess.source_map();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue