Skip to content

Add check for duplicated doc aliases - #89442

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:duplicated-doc-alias
Oct 6, 2021
Merged

Add check for duplicated doc aliases#89442
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:duplicated-doc-alias

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 1, 2021
@joshtriplett

Copy link
Copy Markdown
Member

Does this check only for duplicate aliases on one item, or could it also check for duplicates throughout a crate? I would love to see a warning lint for the latter.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

The latter is perfectly fine though. You can wrap a same C function differently a few times so I definitely don't think that we should warn about it.

Comment threadcompiler/rustc_passes/src/check_attr.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Updated!

@GuillaumeGomezGuillaumeGomez added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Oct 4, 2021
@joshtriplett

joshtriplett commented Oct 5, 2021

Copy link
Copy Markdown
Member

@GuillaumeGomez Libs, at least, has a policy against doing that, so it'd be helpful to have a lint we could turn on to enforce that.

(This is not a blocker for this PR.)

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

No, even libs don't want it: example.

@joshtriplett

Copy link
Copy Markdown
Member

Fair enough, it wouldn't be universal. It might be useful as a warning to be opted out of, but in any case that's not a matter for this PR.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

I think a rustc-specific lint might be the way to go. But yes, out of scope here. ;)

@estebank

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 5, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 013aa37 has been approved by estebank

@borsbors 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 Oct 5, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 5, 2021
…, r=estebank
Add check for duplicated doc aliases
r? `@estebank`
@ManishearthManishearth mentioned this pull request Oct 5, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 5, 2021
…arth
Rollup of 10 pull requests
Successful merges:
- rust-lang#88706 (Normalize associated type projections when checking return type of main)
- rust-lang#88828 (Use `libc::sigaction()` instead of `sys::signal()` to prevent a deadlock)
- rust-lang#88871 (Fix suggestion for nested struct patterns)
- rust-lang#89317 (Move generic error message to separate branches)
- rust-lang#89351 (for signed wrapping remainder, do not compare lhs with MIN)
- rust-lang#89442 (Add check for duplicated doc aliases)
- rust-lang#89502 (Fix Lower/UpperExp formatting for integers and precision zero)
- rust-lang#89523 (Make `proc_macro_derive_resolution_fallback` a future-breakage lint)
- rust-lang#89532 (Document behavior of `MaybeLiveLocals` regarding enums and field-senstivity)
- rust-lang#89546 (Make an initial guess for metadata size to reduce buffer resizes)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 80f1f0d into rust-lang:masterOct 6, 2021
@rustbotrustbot added this to the 1.57.0 milestone Oct 6, 2021
@GuillaumeGomez
GuillaumeGomez deleted the duplicated-doc-alias branch October 6, 2021 09:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@GuillaumeGomez@joshtriplett@estebank@bors@Mark-Simulacrum@rust-highfive@rustbot