-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Rename standalone
doctest attribute into standalone_crate
#130931
Conversation
This PR modifies cc @jieyouxu |
Will this produce a warning if someone has a doctest with the old
|
It just occurred to me that it would also be smart to warn on |
For now the 2024 edition is nightly only, so not sure if it's really useful, especially how little usage there should be for this attribute. However, suggesting |
Updated! Unless this is the 2024 edition, the newly added check/warning won't be triggered. I added ui tests for both cases (with and without the 2024 edition too). |
This looks great, but I have one more question. Why does this one use a hyphen ( |
Because none of us thought about checking coherency. Renaming it. |
b2c451d
to
e9eeaec
Compare
And done, great catch @notriddle ! |
This comment has been minimized.
This comment has been minimized.
e9eeaec
to
4840f99
Compare
standalone
doctest attribute into standalone-crate
standalone
doctest attribute into standalone_crate
And blessed run-make test. |
@bors r+ |
@@ -1,7 +1,5 @@ | |||
|
|||
running 2 tests | |||
test doctest-standalone.rs - (line 4) ... ok | |||
test doctest-standalone.rs - init (line 8) ... ok |
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.
Wait, this is wrong.
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.
Oh wow, I updated the attribute name wrongly. ><
@bors r- |
4840f99
to
6f5f21a
Compare
Fixed wrong test update. @bors r=notriddle |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#130931 (Rename `standalone` doctest attribute into `standalone_crate`) - rust-lang#131000 (Weekly `cargo update`) - rust-lang#131011 (cleanup: don't `.into()` identical types) - rust-lang#131013 (cleanup: don't manually `unwrap_or_default()`) - rust-lang#131014 (cleanup: don't clone types that are Copy) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130931 - GuillaumeGomez:standalone-crate, r=notriddle Rename `standalone` doctest attribute into `standalone_crate` Following [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Renaming.20code.20block.20.22standalone.22.20attribute.3F) and poll results. r? `@notriddle`
Following zulip discussion and poll results.
r? @notriddle