From 5cc278862ce051afbdb1f03e3797419f9f588df4 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Fri, 11 Dec 2015 16:40:25 +0900 Subject: [PATCH] Fix custom deriving tests --- src/libsyntax_ext/lib.rs | 4 +++- src/test/auxiliary/custom_derive_plugin.rs | 5 +++-- src/test/auxiliary/custom_derive_plugin_attr.rs | 7 ++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs index 49c2618d51b9c..b59b7db28cbdc 100644 --- a/src/libsyntax_ext/lib.rs +++ b/src/libsyntax_ext/lib.rs @@ -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 { diff --git a/src/test/auxiliary/custom_derive_plugin.rs b/src/test/auxiliary/custom_derive_plugin.rs index 542b10fd1c68c..a3f42edbed2a8 100644 --- a/src/test/auxiliary/custom_derive_plugin.rs +++ b/src/test/auxiliary/custom_derive_plugin.rs @@ -15,6 +15,7 @@ #![feature(rustc_private)] extern crate syntax; +extern crate syntax_ext; extern crate rustc; extern crate rustc_plugin; @@ -22,10 +23,10 @@ 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] diff --git a/src/test/auxiliary/custom_derive_plugin_attr.rs b/src/test/auxiliary/custom_derive_plugin_attr.rs index f44e77d563a9e..fe12d3b1f080f 100644 --- a/src/test/auxiliary/custom_derive_plugin_attr.rs +++ b/src/test/auxiliary/custom_derive_plugin_attr.rs @@ -15,6 +15,7 @@ #![feature(rustc_private)] extern crate syntax; +extern crate syntax_ext; extern crate rustc; extern crate rustc_plugin; @@ -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]