diff options
| author | bors <bors@rust-lang.org> | 2014-06-10 09:49:29 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-10 09:49:29 -0700 |
| commit | 9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6 (patch) | |
| tree | 6b900931014b0ea0ed76e2b6ee5ab2f78583b165 /src/libsyntax/ext | |
| parent | 0ee6a8e8a564ec0134ebdc0869fab5e4bb28024c (diff) | |
| parent | 8e34f647ee5db795e1ea46715de61cee63f4f4a7 (diff) | |
| download | rust-9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6.tar.gz rust-9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6.zip | |
auto merge of #14696 : jakub-/rust/dead-struct-fields, r=alexcrichton
This uncovered some dead code, most notably in middle/liveness.rs, which I think suggests there must be something fishy with that part of the code. The #[allow(dead_code)] annotations on some of the fields I am not super happy about but as I understand, marker type may disappear at some point.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 7b25f4db980..14769e3e510 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -21,11 +21,6 @@ use parse::token::special_idents; use parse::token::InternedString; use parse::token; -pub struct Field { - ident: ast::Ident, - ex: @ast::Expr -} - // Transitional reexports so qquote can find the paths it is looking for mod syntax { pub use ext; @@ -1000,9 +995,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { } } -struct Duplicator<'a> { - cx: &'a ExtCtxt<'a>, -} +struct Duplicator<'a>; impl<'a> Folder for Duplicator<'a> { fn new_id(&mut self, _: NodeId) -> NodeId { @@ -1021,10 +1014,8 @@ pub trait Duplicate { } impl Duplicate for @ast::Expr { - fn duplicate(&self, cx: &ExtCtxt) -> @ast::Expr { - let mut folder = Duplicator { - cx: cx, - }; + fn duplicate(&self, _: &ExtCtxt) -> @ast::Expr { + let mut folder = Duplicator; folder.fold_expr(*self) } } |
