Created
January 18, 2015 20:43
-
-
Save ArtemGr/96f45adaf2e16f3e16d4 to your computer and use it in GitHub Desktop.
Test case for json_macros bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "err" | |
version = "0.0.1" | |
authors = ["ArtemGr"] | |
[[bin]] | |
name = "test" | |
path = "test.rs" | |
[dependencies] | |
rustc-serialize = "*" | |
[dependencies.json_macros] | |
version = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cargo build | |
Compiling err v0.0.1 (file:///tmp/test-case) | |
error: linking with `cc` failed: exit code: 1 | |
note: cc '-Wl,--as-needed' '-m64' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-o' '/tmp/test-case/target/test' '/tmp/test-case/target/test.o' '-Wl,--whole-archive' '-lmorestack' '-Wl,--no-whole-archive' '-Wl,--gc-sections' '-pie' '-nodefaultlibs' '-L' '/tmp/test-case/target/deps' '-ljson_macros-ff14c0496a209dc6' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc_back-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lsyntax-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lfmt_macros-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lgraphviz-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lflate-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-larena-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lgetopts-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lterm-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrbml-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lserialize-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-llog-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lregex-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc_llvm-4e7c5e5c' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lstd-4e7c5e5c' '-L' '/tmp/test-case/target' '-L' '/tmp/test-case/target/deps' '-L' '/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-L' '/tmp/test-case/.rust/lib/x86_64-unknown-linux-gnu' '-L' '/tmp/test-case/lib/x86_64-unknown-linux-gnu' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-lpthread' '-lrt' '-ldl' '-lm' '-ldl' '-lpthread' '-lrt' '-lgcc_s' '-lpthread' '-lc' '-lm' '-lcompiler-rt' | |
note: /tmp/test-case/target/test.o: In function `test::main': | |
/tmp/test-case/test.rs:10: undefined reference to `json::Json::from_str::hda22c8c9c1048cd3hLg' | |
/tmp/test-case/target/test.o: In function `result::Result$LT$T$C$$u{20}E$GT$::unwrap::h14872046969453426241': | |
test.0.rs:(.text._ZN6result25Result$LT$T$C$$u{20}E$GT$6unwrap21h14872046969453426241E+0x1e4): undefined reference to `json::ParserError...std..fmt..Show::fmt::hf83f6a93a851e062qTe' | |
collect2: error: ld returned 1 exit status | |
error: aborting due to previous error | |
Could not compile `err`. | |
To learn more, run the command again with --verbose. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(plugin)] | |
#[plugin] extern crate json_macros; | |
extern crate "rustc-serialize" as rustc_serialize; | |
use rustc_serialize::json::Json; | |
pub fn main() { | |
Json::from_str ("{\"foo\": \"bar\"}") .unwrap(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment