-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: attribute string literals render with backslashes #81482
Comments
jonas-schievink
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Jan 28, 2021
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Jun 14, 2021
Remove must_use from ALLOWED_ATTRIBUTES This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value. Removing reclaims some valuable space in the summary of methods, particularly when the attribute has a long string value. As discussed in rust-lang#84309. Partially addresses rust-lang#81482. r? `@Manishearth`
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Jun 14, 2021
Remove must_use from ALLOWED_ATTRIBUTES This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value. Removing reclaims some valuable space in the summary of methods, particularly when the attribute has a long string value. As discussed in rust-lang#84309. Partially addresses rust-lang#81482. r? ``@Manishearth``
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Jun 15, 2021
Remove must_use from ALLOWED_ATTRIBUTES This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value. Removing reclaims some valuable space in the summary of methods, particularly when the attribute has a long string value. As discussed in rust-lang#84309. Partially addresses rust-lang#81482. r? ```@Manishearth```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this code:
I expected to see this happen: Rustdoc will render the string as
#[must_use = "this is a message"]
Instead, this happened: It is rendered with a backslash:
Meta
rustdoc 1.51.0-nightly (f4eb5d9f7 2021-01-25)
I believe this started in 1.44 via #69686.
(This is a pretty minor issue, I'm not sure it is worth putting energy into, but it does look a little strange.)
The text was updated successfully, but these errors were encountered: