Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lint by Urgau · Pull Request #124568 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

T-rustdoc

Relevant to the rustdoc team, which will review and decide on the PR/issue.

labels

Apr 30, 2024

fmease

fmease

@Urgau

GuillaumeGomez

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

May 2, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

May 2, 2024
…llaumeGomez

Rollup of 3 pull requests

Successful merges:

 - rust-lang#124568 (Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lint)
 - rust-lang#124582 (always print nice 'std not found' error when std is not found)
 - rust-lang#124597 (Use an explicit x86-64 cpu in tests that are sensitive to it)

r? `@ghost`
`@rustbot` modify labels: rollup

@fmease fmease removed the T-rustdoc

Relevant to the rustdoc team, which will review and decide on the PR/issue.

label

May 2, 2024

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

May 2, 2024
Rollup merge of rust-lang#124568 - Urgau:non-local-defs-doctest, r=michaelwoerister,GuillaumeGomez

Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lint

This PR adjust the help suggestion of the `non_local_definitions` lint when encountering a `#[macro_export]` at top-level doctest.

So instead of a non-sentential help suggestion to move the `macro_rules!` up above the `rustdoc`-generated function. We now suggest users to declare their own function.

Fixes *(partially, needs backport)* rust-lang#124534

This was referenced

Jun 13, 2024

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request

Jun 18, 2024
…r=fmease

Suggest using a standalone doctest for non-local impl defs

This PR tweaks the lint output of the `non_local_definitions` lint to suggest using a standalone doctest instead of a moving the `impl` def to an impossible place as was already done with `macro_rules!` case in rust-lang#124568.

Fixes rust-lang#126339
r? `@fmease`

jieyouxu added a commit to jieyouxu/rust that referenced this pull request

Jun 19, 2024
…r=fmease

Suggest using a standalone doctest for non-local impl defs

This PR tweaks the lint output of the `non_local_definitions` lint to suggest using a standalone doctest instead of a moving the `impl` def to an impossible place as was already done with `macro_rules!` case in rust-lang#124568.

Fixes rust-lang#126339
r? ``@fmease``

jieyouxu added a commit to jieyouxu/rust that referenced this pull request

Jun 19, 2024
…r=fmease

Suggest using a standalone doctest for non-local impl defs

This PR tweaks the lint output of the `non_local_definitions` lint to suggest using a standalone doctest instead of a moving the `impl` def to an impossible place as was already done with `macro_rules!` case in rust-lang#124568.

Fixes rust-lang#126339
r? ```@fmease```

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jun 19, 2024
Rollup merge of rust-lang#126422 - Urgau:doctest-impl-non-local-def, r=fmease

Suggest using a standalone doctest for non-local impl defs

This PR tweaks the lint output of the `non_local_definitions` lint to suggest using a standalone doctest instead of a moving the `impl` def to an impossible place as was already done with `macro_rules!` case in rust-lang#124568.

Fixes rust-lang#126339
r? ```@fmease```