-
Notifications
You must be signed in to change notification settings - Fork 520
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
Use doc
, not test
for fn item inner attr example
#906
Conversation
Using `test` causes a deny-by-default lint to trigger. See rust-lang/rust#79003 for more information.
Thanks! The sentence above the example should probably be updated ( I think it would also be a good idea to document this behavior somehow. AFAIK (rustc_builtin_macros), the only attributes this affects is |
src/items/functions.md
Outdated
@@ -295,7 +295,7 @@ available while running tests. | |||
|
|||
```rust | |||
fn test_only() { | |||
#![test] | |||
#![doc("Example")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#![doc("Example")] | |
#![doc = "Example"] |
doc("Example")
is not currently rejected by validation, but it doesn't do anything.
I want to focus this PR on just getting toolstate working, so the update to the test file shall be in its own PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Seems reasonable, I don't think there is any rush. It's an extreme edge case, that hopefully some day will be removed, in which case there will be no need to document it.
Update books ## nomicon 1 commits in 23c49f1d5ce4720bc5b7e3a920f47eccc8da6b63..d8383b65f7948c2ca19191b3b4bd709b403aaf45 2020-11-05 13:30:53 +0900 to 2020-11-22 10:24:42 -0500 - Clarify that any alignment is valid for ZSTs ## reference 5 commits in a7de763c213292f5b44bf10acb87ffa38724814d..a8afdca5d0715b2257b6f8b9a032fd4dd7dae855 2020-11-11 19:13:21 -0800 to 2020-11-30 06:44:46 -0800 - Describe relationship between reference and optimizers (rust-lang/reference#902) - A simple missing space (rust-lang/reference#909) - Cleanup formatting (rust-lang/reference#907) - Use `doc`, not `test` for fn item inner attr example (rust-lang/reference#906) - Update where our chat is. (rust-lang/reference#903) ## book 1 commits in 13e1c05420bca86ecc79e4ba5b6d02de9bd53c62..a190438d77d28041f24da4f6592e287fab073a61 2020-10-20 14:57:32 -0500 to 2020-11-16 10:44:08 -0600 - Change SipHash not found (404) link to SipHash in Wikipedia (rust-lang/book#2503) ## rust-by-example 4 commits in 1886fda6981b723e4de637074455558f8bc1e83c..236c734a2cb323541b3394f98682cb981b9ec086 2020-10-28 13:46:54 -0500 to 2020-11-30 14:05:49 -0300 - Update old invalid link (rust-lang/rust-by-example#1392) - Moved "See also" link to the correct page. (rust-lang/rust-by-example#1389) - Fix some markdown lint warnings (rust-lang/rust-by-example#1388) - Minor grammar suggestion (rust-lang/rust-by-example#1386) ## embedded-book 1 commits in ca8169e69b479f615855d0eece7e318138fcfc00..ba34b8a968f9531d38c4dc4411d5568b7c076bfe 2020-10-15 15:06:35 +0000 to 2020-11-17 00:20:43 +0000 - Clarify CAS availability (rust-embedded/book#273)
Update books ## nomicon 1 commits in 23c49f1d5ce4720bc5b7e3a920f47eccc8da6b63..d8383b65f7948c2ca19191b3b4bd709b403aaf45 2020-11-05 13:30:53 +0900 to 2020-11-22 10:24:42 -0500 - Clarify that any alignment is valid for ZSTs ## reference 5 commits in a7de763c213292f5b44bf10acb87ffa38724814d..a8afdca5d0715b2257b6f8b9a032fd4dd7dae855 2020-11-11 19:13:21 -0800 to 2020-11-30 06:44:46 -0800 - Describe relationship between reference and optimizers (rust-lang/reference#902) - A simple missing space (rust-lang/reference#909) - Cleanup formatting (rust-lang/reference#907) - Use `doc`, not `test` for fn item inner attr example (rust-lang/reference#906) - Update where our chat is. (rust-lang/reference#903) ## book 1 commits in 13e1c05420bca86ecc79e4ba5b6d02de9bd53c62..a190438d77d28041f24da4f6592e287fab073a61 2020-10-20 14:57:32 -0500 to 2020-11-16 10:44:08 -0600 - Change SipHash not found (404) link to SipHash in Wikipedia (rust-lang/book#2503) ## rust-by-example 4 commits in 1886fda6981b723e4de637074455558f8bc1e83c..236c734a2cb323541b3394f98682cb981b9ec086 2020-10-28 13:46:54 -0500 to 2020-11-30 14:05:49 -0300 - Update old invalid link (rust-lang/rust-by-example#1392) - Moved "See also" link to the correct page. (rust-lang/rust-by-example#1389) - Fix some markdown lint warnings (rust-lang/rust-by-example#1388) - Minor grammar suggestion (rust-lang/rust-by-example#1386) ## embedded-book 1 commits in ca8169e69b479f615855d0eece7e318138fcfc00..ba34b8a968f9531d38c4dc4411d5568b7c076bfe 2020-10-15 15:06:35 +0000 to 2020-11-17 00:20:43 +0000 - Clarify CAS availability (rust-embedded/book#273)
Using
test
causes a deny-by-default lint to trigger. Seerust-lang/rust#79003 for more information.