{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/22547","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/22547/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/22547/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/22547/events","html_url":"https://github.com/rust-lang/rust/issues/22547","id":58258521,"number":22547,"title":"A better error message for misplaced doc comments","user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-diagnostics","name":"A-diagnostics","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-19T19:45:33Z","updated_at":"2015-10-24T02:28:34Z","closed_at":null,"body":"This code:\r\n\r\n```\r\nenum Option<T> {\r\n    None,    /// No value\r\n    Some(T),    /// Some value `T`\r\n}\r\n```\r\n\r\nyields this error:\r\n\r\n```\r\n error: expected ident, found `}`\r\n }\r\n ^\r\n```\r\n\r\nI was writing an example to show this erorr, and _still_ didn't realize this was the correct error for this problem. "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/150742743","html_url":"https://github.com/rust-lang/rust/issues/22547#issuecomment-150742743","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/22547","id":150742743,"user":{"login":"andyg0808","id":1283490,"avatar_url":"https://avatars.githubusercontent.com/u/1283490?v=3","gravatar_id":"","url":"https://api.github.com/users/andyg0808","html_url":"https://github.com/andyg0808","followers_url":"https://api.github.com/users/andyg0808/followers","following_url":"https://api.github.com/users/andyg0808/following{/other_user}","gists_url":"https://api.github.com/users/andyg0808/gists{/gist_id}","starred_url":"https://api.github.com/users/andyg0808/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyg0808/subscriptions","organizations_url":"https://api.github.com/users/andyg0808/orgs","repos_url":"https://api.github.com/users/andyg0808/repos","events_url":"https://api.github.com/users/andyg0808/events{/privacy}","received_events_url":"https://api.github.com/users/andyg0808/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T02:28:34Z","updated_at":"2015-10-24T02:28:34Z","body":"@tshepang What would you think of treating documentation on the same line as code as if it was written immediately above the code? That is,\r\n```rust\r\nenum Option<T> {\r\n    /// No value\r\n    None,    /// I mean there really is No value\r\n    Some(T), /// Some value `T`\r\n}\r\n```\r\nwould be treated as if it were\r\n```rust\r\nenum Option<T> {\r\n    /// No value\r\n    /// I mean there really is No value\r\n    None,\r\n    /// Some value `T`\r\n    Some(T),\r\n}\r\n```"}}