Description
The documentation of Iterator trait on 1.49.0 (current stable) doesn't contain pub
modifier in function declaration of that trait.
However, on beta and nightly, there is pub
modifier.
This is wrong because you cannot use pub
modifier for each method/function in Trait definition.
Why is this important? People copy the method/function declaration in the documentation to their code
and see the compiler error: error[E0449]: unnecessary visibility qualifier
.
Meta
rustc --version --verbose
:
rustc 1.49.0 (e1884a8e3 2020-12-29)
binary: rustc
commit-hash: e1884a8e3c3e813aada8254edfa120e85bf5ffca
commit-date: 2020-12-29
host: x86_64-unknown-linux-gnu
release: 1.49.0
cc @jyn514 I think this might relate to some changes in visibility around macros ?
Metadata
Metadata
Assignees
Labels
Area: Documentation that has been re-exported from a different crateArea: Visibility / privacyCategory: This is a bug.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Medium priorityRelevant to the rustdoc team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.