{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/25108","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/25108/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/25108/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/25108/events","html_url":"https://github.com/rust-lang/rust/issues/25108","id":73136608,"number":25108,"title":"rustdoc --output-format json command seems broken","user":{"login":"GuillaumeGomez","id":3050060,"avatar_url":"https://avatars.githubusercontent.com/u/3050060?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeGomez","html_url":"https://github.com/GuillaumeGomez","followers_url":"https://api.github.com/users/GuillaumeGomez/followers","following_url":"https://api.github.com/users/GuillaumeGomez/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeGomez/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeGomez/orgs","repos_url":"https://api.github.com/users/GuillaumeGomez/repos","events_url":"https://api.github.com/users/GuillaumeGomez/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeGomez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-04T21:47:56Z","updated_at":"2015-05-04T21:47:56Z","closed_at":null,"body":"I tried this command:\r\n\r\n```Shell\r\n> rustdoc --output-format json src/sysinfo.rs\r\n```\r\n\r\nOn this [repo](https://github.com/GuillaumeGomez/sysinfo).\r\n\r\nResult:\r\n\r\n```Shell\r\nsrc/sysinfo.rs:13:1: 13:19 error: use of unstable library feature 'libc'\r\nsrc/sysinfo.rs:13 extern crate libc;\r\n                  ^~~~~~~~~~~~~~~~~~\r\nsrc/sysinfo.rs:13:1: 13:19 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/processus.rs:43:42: 43:47 error: use of unstable library feature 'libc'\r\nsrc/processus.rs:43         unsafe { ::ffi::kill(self.pid as c_int, signal as c_int) == 0 }\r\n                                                             ^~~~~\r\nsrc/processus.rs:43:42: 43:47 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/processus.rs:43:59: 43:64 error: use of unstable library feature 'libc'\r\nsrc/processus.rs:43         unsafe { ::ffi::kill(self.pid as c_int, signal as c_int) == 0 }\r\n                                                                              ^~~~~\r\nsrc/processus.rs:43:59: 43:64 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:15:5: 15:41 error: use of unstable library feature 'libc'\r\nsrc/system.rs:15 use libc::types::os::arch::posix01::stat;\r\n                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nsrc/system.rs:15:5: 15:41 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:16:5: 16:17 error: use of unstable library feature 'libc'\r\nsrc/system.rs:16 use libc::c_char;\r\n                     ^~~~~~~~~~~~\r\nsrc/system.rs:16:5: 16:17 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:17:5: 17:39 error: use of unstable library feature 'libc'\r\nsrc/system.rs:17 use libc::funcs::posix01::stat_::lstat;\r\n                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nsrc/system.rs:17:5: 17:39 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:279:35: 279:39 error: use of unstable library feature 'libc'\r\nsrc/system.rs:279                     let mut buf : stat = unsafe { ::std::mem::uninitialized() };\r\n                                                    ^~~~\r\nsrc/system.rs:279:35: 279:39 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:280:90: 280:96 error: use of unstable library feature 'libc'\r\nsrc/system.rs:280                     let res = unsafe { lstat(result.to_str().unwrap().as_ptr() as *const c_char, &mut buf as *mut stat) };\r\n                                                                                                           ^~~~~~\r\nsrc/system.rs:280:90: 280:96 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:280:115: 280:119 error: use of unstable library feature 'libc'\r\nsrc/system.rs:280                     let res = unsafe { lstat(result.to_str().unwrap().as_ptr() as *const c_char, &mut buf as *mut stat) };\r\n                                                                                                                                    ^~~~\r\nsrc/system.rs:280:115: 280:119 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:280:40: 280:45 error: use of unstable library feature 'libc'\r\nsrc/system.rs:280                     let res = unsafe { lstat(result.to_str().unwrap().as_ptr() as *const c_char, &mut buf as *mut stat) };\r\n                                                         ^~~~~\r\nsrc/system.rs:280:40: 280:45 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:282:40: 282:47 error: use of unstable library feature 'libc'\r\nsrc/system.rs:282                     if res < 0 || (buf.st_mode  & S_IFMT) != S_IFLNK {\r\n                                                         ^~~~~~~\r\nsrc/system.rs:282:40: 282:47 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:282:51: 282:57 error: use of unstable library feature 'libc'\r\nsrc/system.rs:282                     if res < 0 || (buf.st_mode  & S_IFMT) != S_IFLNK {\r\n                                                                    ^~~~~~\r\nsrc/system.rs:282:51: 282:57 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/system.rs:282:62: 282:69 error: use of unstable library feature 'libc'\r\nsrc/system.rs:282                     if res < 0 || (buf.st_mode  & S_IFMT) != S_IFLNK {\r\n                                                                               ^~~~~~~\r\nsrc/system.rs:282:62: 282:69 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/ffi.rs:10:19: 10:24 error: use of unstable library feature 'libc'\r\nsrc/ffi.rs:10 \tpub fn kill(pid: c_int, signal: c_int) -> c_int;\r\n              \t                 ^~~~~\r\nsrc/ffi.rs:10:19: 10:24 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/ffi.rs:10:34: 10:39 error: use of unstable library feature 'libc'\r\nsrc/ffi.rs:10 \tpub fn kill(pid: c_int, signal: c_int) -> c_int;\r\n              \t                                ^~~~~\r\nsrc/ffi.rs:10:34: 10:39 help: add #![feature(libc)] to the crate attributes to enable\r\nsrc/ffi.rs:10:44: 10:49 error: use of unstable library feature 'libc'\r\nsrc/ffi.rs:10 \tpub fn kill(pid: c_int, signal: c_int) -> c_int;\r\n              \t                                          ^~~~~\r\nsrc/ffi.rs:10:44: 10:49 help: add #![feature(libc)] to the crate attributes to enable\r\nerror: aborting due to 16 previous errors\r\nthread '<unnamed>' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:192\r\nthread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: \"rustc failed\"', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:729\r\nthread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Any', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:729\r\n```\r\n\r\nSo then I added the \"missing\" feature (that's weird by the way) and then I got:\r\n\r\n```Shell\r\n> rustdoc --output-format json src/sysinfo.rs \r\nthread '<unnamed>' panicked at 'Rust generated JSON is invalid: SyntaxError(EOFWhileParsingObject, 1, 99690)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustdoc/lib.rs:525\r\nthread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Any', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:729\r\n```\r\n\r\nI guess rustdoc is broken somehow ? Here's my current rustdoc version:\r\n\r\n```Shell\r\n> rustdoc --version\r\nrustdoc 1.1.0-nightly (ce1150b9f 2015-05-04) (built 2015-05-04)\r\n```"}}