diff options
| author | bors <bors@rust-lang.org> | 2014-02-20 01:51:56 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-20 01:51:56 -0800 |
| commit | 25ba057fad54da946bb3d72925c9a93b0abe61ac (patch) | |
| tree | 141f807a6abb9d11c60a234524d259d943868be0 /src/libsyntax/parse | |
| parent | f76628d3904454241e41acb033f6ececfdd08b4c (diff) | |
| parent | 53b9d1a3248143aafe421566ba31742579da9722 (diff) | |
| download | rust-25ba057fad54da946bb3d72925c9a93b0abe61ac.tar.gz rust-25ba057fad54da946bb3d72925c9a93b0abe61ac.zip | |
auto merge of #12343 : liigo/rust/move-extra-test-to-libtest, r=alexcrichton
I don't think `extra` is a good/meaningful name for a library. `libextra` should disappear, and we move all of its sub modules out of it. This PR is just one of that steps: move `extra::test` to `libtest`. I didn't add `libtest` to doc index, because it's an internal library currently. **Update:** All comments addressed. All tests passed. Rebased and squashed.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index b4139714a2e..08aec075770 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -283,9 +283,10 @@ pub fn maybe_aborted<T>(result: T, mut p: Parser) -> T { #[cfg(test)] mod test { + extern crate extra; + use self::extra::json; use super::*; use serialize::Encodable; - use extra; use std::io; use std::io::MemWriter; use std::str; @@ -300,9 +301,9 @@ mod test { use util::parser_testing::string_to_stmt; #[cfg(test)] - fn to_json_str<'a, E: Encodable<extra::json::Encoder<'a>>>(val: &E) -> ~str { + fn to_json_str<'a, E: Encodable<json::Encoder<'a>>>(val: &E) -> ~str { let mut writer = MemWriter::new(); - let mut encoder = extra::json::Encoder::new(&mut writer as &mut io::Writer); + let mut encoder = json::Encoder::new(&mut writer as &mut io::Writer); val.encode(&mut encoder); str::from_utf8_owned(writer.unwrap()).unwrap() } |
