Adjust inner span of implicit self ref argument
This commit is contained in:
parent
8621285e3b
commit
0f7ef1a202
6 changed files with 71 additions and 7 deletions
|
@ -2353,7 +2353,12 @@ impl Param {
|
|||
/// Builds a `Param` object from `ExplicitSelf`.
|
||||
pub fn from_self(attrs: AttrVec, eself: ExplicitSelf, eself_ident: Ident) -> Param {
|
||||
let span = eself.span.to(eself_ident.span);
|
||||
let infer_ty = P(Ty { id: DUMMY_NODE_ID, kind: TyKind::ImplicitSelf, span, tokens: None });
|
||||
let infer_ty = P(Ty {
|
||||
id: DUMMY_NODE_ID,
|
||||
kind: TyKind::ImplicitSelf,
|
||||
span: eself_ident.span,
|
||||
tokens: None,
|
||||
});
|
||||
let (mutbl, ty) = match eself.node {
|
||||
SelfKind::Explicit(ty, mutbl) => (mutbl, ty),
|
||||
SelfKind::Value(mutbl) => (mutbl, infer_ty),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue