diff options
| author | John Clements <clements@racket-lang.org> | 2013-03-15 09:17:49 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2013-03-15 09:17:49 -0700 |
| commit | 4bd26481c4c91858c544981990efb2f48e5d3bbe (patch) | |
| tree | e1907f4769f9ee2ce6cd90526971eb25a3c1657a /src/libsyntax/parse | |
| parent | b5ace4df455606b5056331fa3f5ea86498dca448 (diff) | |
| download | rust-4bd26481c4c91858c544981990efb2f48e5d3bbe.tar.gz rust-4bd26481c4c91858c544981990efb2f48e5d3bbe.zip | |
Update test case to conform to new restrictions on casting
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 05af549732b..66a3ae7a2ae 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -297,10 +297,9 @@ mod test { use std; use core::io; use core::option::None; - use core::str; use util::testing::*; - #[test] fn to_json_str (val: @Encodable<std::json::Encoder>) -> ~str { + #[test] fn to_json_str<E : Encodable<std::json::Encoder>>(val: @E) -> ~str { do io::with_str_writer |writer| { val.encode(~std::json::Encoder(writer)); } @@ -312,7 +311,7 @@ mod test { @~"fn foo (x : int) { x; }", ~[], new_parse_sess(None)); - check_equal(to_json_str(@tts as Encodable::<std::json::Encoder>), + check_equal(to_json_str(@tts), ~"[[\"tt_tok\",[null,[\"IDENT\",[\"fn\",false]]]],\ [\"tt_tok\",[null,[\"IDENT\",[\"foo\",false]]]],\ [\"tt_delim\",[[[\"tt_tok\",[null,[\"LPAREN\",[]]]],\ |
