diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-25 02:45:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-25 02:45:04 +0200 |
| commit | b0d374a0b1c4b02757941c63cadfad7d53120f1d (patch) | |
| tree | edd115e91f5f5a9c960fee1653982297bd052a36 /src/libsyntax/ext | |
| parent | 7059f0571a7f2160ea0ebfe4bd8d46836c834696 (diff) | |
| parent | 6a3d51731408708cbc6a6e4e2683da8df7326007 (diff) | |
| download | rust-b0d374a0b1c4b02757941c63cadfad7d53120f1d.tar.gz rust-b0d374a0b1c4b02757941c63cadfad7d53120f1d.zip | |
Rollup merge of #63854 - c410-f3r:attrs-visit, r=petrochenkov
Modifies how Arg, Arm, Field, FieldPattern and Variant are visited Part of the necessary work to accomplish #63468.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index c8c0f4ce36e..a6b56e4d597 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -1209,9 +1209,13 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { } } - fn visit_generic_params(&mut self, params: &mut Vec<ast::GenericParam>) { - self.cfg.configure_generic_params(params); - noop_visit_generic_params(params, self); + fn flat_map_generic_param( + &mut self, + param: ast::GenericParam + ) -> SmallVec<[ast::GenericParam; 1]> + { + let param = configure!(self, param); + noop_flat_map_generic_param(param, self) } fn visit_attribute(&mut self, at: &mut ast::Attribute) { |
