{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/27499","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/27499/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/27499/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/27499/events","html_url":"https://github.com/rust-lang/rust/pull/27499","id":98816325,"number":27499,"title":"Use different numbers of `#`s when expanding documentation comments","user":{"login":"barosl","id":573768,"avatar_url":"https://avatars.githubusercontent.com/u/573768?v=3","gravatar_id":"","url":"https://api.github.com/users/barosl","html_url":"https://github.com/barosl","followers_url":"https://api.github.com/users/barosl/followers","following_url":"https://api.github.com/users/barosl/following{/other_user}","gists_url":"https://api.github.com/users/barosl/gists{/gist_id}","starred_url":"https://api.github.com/users/barosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barosl/subscriptions","organizations_url":"https://api.github.com/users/barosl/orgs","repos_url":"https://api.github.com/users/barosl/repos","events_url":"https://api.github.com/users/barosl/events{/privacy}","received_events_url":"https://api.github.com/users/barosl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-needs-decision","name":"I-needs-decision","color":"e11d21"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-nominated","name":"I-nominated","color":"e10c02"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/T-lang","name":"T-lang","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2015-08-03T18:57:50Z","updated_at":"2015-10-29T21:54:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/27499","html_url":"https://github.com/rust-lang/rust/pull/27499","diff_url":"https://github.com/rust-lang/rust/pull/27499.diff","patch_url":"https://github.com/rust-lang/rust/pull/27499.patch"},"body":"Any documentation comments that contain raw-string-looking sequences may pretty-print invalid code when expanding them, as the current logic always uses the `r\"literal\"` form, without appending any `#`s.\r\n\r\nThis commit calculates the minimum number of `#`s required to wrap a comment correctly and appends `#`s appropriately.\r\n\r\nFixes #27489."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/152339209","html_url":"https://github.com/rust-lang/rust/pull/27499#issuecomment-152339209","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/27499","id":152339209,"user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T21:54:20Z","updated_at":"2015-10-29T21:54:20Z","body":"Discussed at lang team meeting. Consensus was: I do think @brson raised a good point, but I also feel comfortable with this solution. It seems like a strict improvement on the status quo -- we desugar `///` into *valid* `#[doc]` attributes instead of invalid ones, seems like a win. On the other hand, the fact that `stringify!` theoretically (at least) introduces a backwards compat. dependency on the current pretty printer (and the `///` desugaring) is definitely unacceptable, we should make sure to comment that macro (at minimum) and caveat that the precise output for expressions and non-trivial AST nodes may change."}}