Skip to content

Commit

Permalink
Fix custom deriving tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sanxiyn committed Dec 11, 2015
1 parent f8f4e2c commit 5cc2788
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/libsyntax_ext/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ mod asm;
mod cfg;
mod concat;
mod concat_idents;
mod deriving;
mod env;
mod format;
mod log_syntax;
mod trace_macros;

// for custom_derive
pub mod deriving;

pub fn register_builtins(env: &mut SyntaxEnv) {
// utility function to simplify creating NormalTT syntax extensions
fn builtin_normal_expander(f: MacroExpanderFn) -> SyntaxExtension {
Expand Down
5 changes: 3 additions & 2 deletions src/test/auxiliary/custom_derive_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@
#![feature(rustc_private)]

extern crate syntax;
extern crate syntax_ext;
extern crate rustc;
extern crate rustc_plugin;

use syntax::ast;
use syntax::codemap::Span;
use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable};
use syntax::ext::build::AstBuilder;
use syntax::ext::deriving::generic::{cs_fold, TraitDef, MethodDef, combine_substructure};
use syntax::ext::deriving::generic::ty::{Literal, LifetimeBounds, Path, borrowed_explicit_self};
use syntax::parse::token;
use syntax::ptr::P;
use syntax_ext::deriving::generic::{cs_fold, TraitDef, MethodDef, combine_substructure};
use syntax_ext::deriving::generic::ty::{Literal, LifetimeBounds, Path, borrowed_explicit_self};
use rustc_plugin::Registry;

#[plugin_registrar]
Expand Down
7 changes: 4 additions & 3 deletions src/test/auxiliary/custom_derive_plugin_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#![feature(rustc_private)]

extern crate syntax;
extern crate syntax_ext;
extern crate rustc;
extern crate rustc_plugin;

Expand All @@ -23,11 +24,11 @@ use syntax::attr::AttrMetaMethods;
use syntax::codemap::Span;
use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable};
use syntax::ext::build::AstBuilder;
use syntax::ext::deriving::generic::{cs_fold, TraitDef, MethodDef, combine_substructure};
use syntax::ext::deriving::generic::{Substructure, Struct, EnumMatching};
use syntax::ext::deriving::generic::ty::{Literal, LifetimeBounds, Path, borrowed_explicit_self};
use syntax::parse::token;
use syntax::ptr::P;
use syntax_ext::deriving::generic::{cs_fold, TraitDef, MethodDef, combine_substructure};
use syntax_ext::deriving::generic::{Substructure, Struct, EnumMatching};
use syntax_ext::deriving::generic::ty::{Literal, LifetimeBounds, Path, borrowed_explicit_self};
use rustc_plugin::Registry;

#[plugin_registrar]
Expand Down

0 comments on commit 5cc2788

Please sign in to comment.