diff options
| author | bors <bors@rust-lang.org> | 2016-05-15 23:14:52 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-05-15 23:14:52 -0700 |
| commit | e87cd7e380c89e3f80ceab417e3525e546a1e362 (patch) | |
| tree | 288390b3cbebcc2f747a8ffea4a26b5c800bdabe /src/libsyntax_ext | |
| parent | e90307d2a214614ca55ce31371c0768d7bffa114 (diff) | |
| parent | a62a6903268a68e793407aca05a64e89b8b22f1b (diff) | |
| download | rust-e87cd7e380c89e3f80ceab417e3525e546a1e362.tar.gz rust-e87cd7e380c89e3f80ceab417e3525e546a1e362.zip | |
Auto merge of #33505 - petrochenkov:self, r=nrc
Remove ExplicitSelf from HIR `self` argument is already kept in the argument list and can be retrieved from there if necessary, so there's no need for the duplication. The same changes can be applied to AST, I'll make them in the next breaking batch. The first commit also improves parsing of method declarations and fixes https://github.com/rust-lang/rust/issues/33413. r? @eddyb
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 45029c8eb94..20fb4bf32cc 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -867,9 +867,8 @@ impl<'a> MethodDef<'a> { let self_arg = match explicit_self.node { ast::SelfKind::Static => None, // creating fresh self id - _ => Some(ast::Arg::new_self(trait_.span, - ast::Mutability::Immutable, - keywords::SelfValue.ident())) + _ => Some(ast::Arg::from_self(explicit_self.clone(), trait_.span, + ast::Mutability::Immutable)), }; let args = { let args = arg_types.into_iter().map(|(name, ty)| { |
