-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add an option to not run rustdoc blocks #12777
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
Conversation
runtest(test, cratename, libs, should_fail); | ||
if !no_run { | ||
runtest(test, cratename, libs, should_fail); | ||
} |
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.
Doesn't this both not run the test and not compile it? I thought no_run
was to only not run, but still compile?
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.
Oops, I misread the way this worked :/
I also just remembered that I have done this in the past via:
It's probably better to have an official solution for this though. |
You can specify that the code block should be compiled but not run with the | ||
`no_run` directive. | ||
|
||
~~~ |
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.
This will have to change after #12747 lands: https://github.com/mozilla/rust/pull/12747/files#diff-1549ab8fe181dacd0922ab15063fd424R108
This is useful for code that would be expensive to run or has some kind of external dependency (e.g. a database or server).
@alexcrichton updated |
This is useful for code that would be expensive to run or has some kind of external dependency (e.g. a database or server).
… r=Alexendoo fix: merge multiple suggestions into a single multi-span suggestion in `needless_late_init` See rust-lang/rust-analyzer#17163 (comment). Currently, the fix for `needless_late_init` would modify multiple parts in the file. However, these modifications are exported as separate suggestions instead of a unified 'multi-part suggestion'. Consequently, rust-analyzer is unable to perform the fix correctly when applying suggestions automatically, as only one suggestion is processed at a time. This PR addresses this issue by merge all modifications into a single multi-part suggestion. changelog: [`needless_late_init`]: merge multiple fixes into a single multi-span fix.
This is useful for code that would be expensive to run or has some kind
of external dependency (e.g. a database or server).