diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-12-05 03:51:11 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-12-22 06:14:35 +0000 |
| commit | f10f50b42639718b2580d10802f05f2b6ff209d5 (patch) | |
| tree | 19b61435b37e14f97a74e18b6db32c507e7b1a58 /src/libsyntax_ext | |
| parent | 164619a8cfe6d376d25bd3a6a9a5f2856c8de64d (diff) | |
| download | rust-f10f50b42639718b2580d10802f05f2b6ff209d5.tar.gz rust-f10f50b42639718b2580d10802f05f2b6ff209d5.zip | |
Refactor how global paths are represented (for both ast and hir).
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/concat_idents.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 11 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/libsyntax_ext/concat_idents.rs b/src/libsyntax_ext/concat_idents.rs index 1381490efa1..1fc1bdff593 100644 --- a/src/libsyntax_ext/concat_idents.rs +++ b/src/libsyntax_ext/concat_idents.rs @@ -61,7 +61,6 @@ pub fn expand_syntax_ext<'cx>(cx: &'cx mut ExtCtxt, fn path(&self) -> ast::Path { ast::Path { span: self.span, - global: false, segments: vec![self.ident.into()], } } diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 51199819dfc..7f187d8d1c1 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -363,15 +363,12 @@ fn find_type_parameters(ty: &ast::Ty, impl<'a, 'b> visit::Visitor<'a> for Visitor<'a, 'b> { fn visit_ty(&mut self, ty: &'a ast::Ty) { - match ty.node { - ast::TyKind::Path(_, ref path) if !path.global => { - if let Some(segment) = path.segments.first() { - if self.ty_param_names.contains(&segment.identifier.name) { - self.types.push(P(ty.clone())); - } + if let ast::TyKind::Path(_, ref path) = ty.node { + if let Some(segment) = path.segments.first() { + if self.ty_param_names.contains(&segment.identifier.name) { + self.types.push(P(ty.clone())); } } - _ => {} } visit::walk_ty(self, ty) |
