diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-09-11 17:07:49 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-09-19 15:11:00 +1200 |
| commit | ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7 (patch) | |
| tree | 9ea529bfee7d62b85288d37b0e2bbcdd1c866e0d /src/libregex_macros/lib.rs | |
| parent | af3889f6979647b9bd2dc5f5132d80e3e5b405a5 (diff) | |
| download | rust-ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7.tar.gz rust-ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7.zip | |
Add enum variants to the type namespace
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
Diffstat (limited to 'src/libregex_macros/lib.rs')
| -rw-r--r-- | src/libregex_macros/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libregex_macros/lib.rs b/src/libregex_macros/lib.rs index 12809184003..ae6dd2a4d70 100644 --- a/src/libregex_macros/lib.rs +++ b/src/libregex_macros/lib.rs @@ -42,7 +42,7 @@ use regex::Regex; use regex::native::{ OneChar, CharClass, Any, Save, Jump, Split, Match, EmptyBegin, EmptyEnd, EmptyWordBoundary, - Program, Dynamic, Native, + Program, Dynamic, ExDynamic, Native, FLAG_NOCASE, FLAG_MULTI, FLAG_DOTNL, FLAG_NEGATED, }; @@ -91,7 +91,7 @@ fn native(cx: &mut ExtCtxt, sp: codemap::Span, tts: &[ast::TokenTree]) } }; let prog = match re { - Dynamic(Dynamic { ref prog, .. }) => prog.clone(), + Dynamic(ExDynamic { ref prog, .. }) => prog.clone(), Native(_) => unreachable!(), }; @@ -322,7 +322,7 @@ fn exec<'t>(which: ::regex::native::MatchKind, input: &'t str, } } -::regex::native::Native(::regex::native::Native { +::regex::native::Native(::regex::native::ExNative { original: $regex, names: CAP_NAMES, prog: exec, |
