Skip to content
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

Add check for doc alias attribute at crate level #76329

Merged
merged 6 commits into from
Oct 5, 2020

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Sep 4, 2020

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 4, 2020
@GuillaumeGomez GuillaumeGomez force-pushed the doc-alias-crate-level branch 2 times, most recently from 0491b6b to 74a09f6 Compare September 5, 2020 11:35
@GuillaumeGomez
Copy link
Member Author

@ollie27 More information: it's actually pretty complicated to pass down the crate level because we try to run its components in parallel or want to filter the items we iterate over. I'm not sure there is a global fix for this, or at least don't see any obvious one...

@GuillaumeGomez GuillaumeGomez force-pushed the doc-alias-crate-level branch 2 times, most recently from bc15436 to e6771ab Compare September 13, 2020 10:42
@GuillaumeGomez
Copy link
Member Author

ping @ollie27

compiler/rustc_interface/src/passes.rs Outdated Show resolved Hide resolved
compiler/rustc_passes/src/check_attr.rs Outdated Show resolved Hide resolved
compiler/rustc_passes/src/check_attr.rs Show resolved Hide resolved
compiler/rustc_passes/src/check_attr.rs Show resolved Hide resolved
compiler/rustc_passes/src/check_attr.rs Outdated Show resolved Hide resolved
compiler/rustc_passes/src/check_attr.rs Outdated Show resolved Hide resolved
@GuillaumeGomez
Copy link
Member Author

Updated!

@GuillaumeGomez
Copy link
Member Author

ping @ollie27

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-doc-alias Area: `#[doc(alias)]` labels Sep 27, 2020
Comment on lines -55 to -67
#![macro_export] //~ WARN unused attribute
// skipping testing of cfg
// skipping testing of cfg_attr
#![main] //~ WARN unused attribute
#![start] //~ WARN unused attribute
// see issue-43106-gating-of-test.rs for crate-level; but non crate-level is below at "4200"
// see issue-43106-gating-of-bench.rs for crate-level; but non crate-level is below at "4100"
#![repr()]
//~^ WARN unused attribute
#![path = "3800"] //~ WARN unused attribute
#![automatically_derived] //~ WARN unused attribute
#![no_mangle]
#![no_link] //~ WARN unused attribute
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were these removed? If they're now errors then they should be moved to issue-43106-gating-of-builtin-attrs-error.rs or another dedicated test to make sure they stay errors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a check-pass kind of test. Creating another one test including all the newly failing ones.

@ollie27
Copy link
Member

ollie27 commented Sep 29, 2020

Apart from a few questions about the test changes this looks good to me.

I'm going to hand this over this over to the compiler team though because this is not really a rustdoc change anymore and is introducing new errors. Also to make sure we haven't missed an obvious better way to check crate level attributes.

r? @matthewjasper

@ollie27 ollie27 added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 29, 2020
@GuillaumeGomez
Copy link
Member Author

I put back the checks into another file which is expected to fail.

@bors
Copy link
Contributor

bors commented Oct 1, 2020

☔ The latest upstream changes (presumably #77381) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@bors
Copy link
Contributor

bors commented Oct 2, 2020

☔ The latest upstream changes (presumably #77462) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@GuillaumeGomez
Copy link
Member Author

r? @oli-obk

@GuillaumeGomez GuillaumeGomez force-pushed the doc-alias-crate-level branch 4 times, most recently from b18a5b2 to 89c4898 Compare October 3, 2020 21:54
@GuillaumeGomez
Copy link
Member Author

Updated!

@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 4, 2020

📌 Commit 3641a37 has been approved by matthewjasper

@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 Oct 4, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 5, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#75853 (Use more intra-doc-links in `core::fmt`)
 - rust-lang#75928 (Remove trait_selection error message in specific case)
 - rust-lang#76329 (Add check for doc alias attribute at crate level)
 - rust-lang#77219 (core::global_allocator docs link to std::alloc::GlobalAlloc)
 - rust-lang#77395 (BTreeMap: admit the existence of leaf edges in comments)
 - rust-lang#77407 (Improve build-manifest to work with the improved promote-release)
 - rust-lang#77426 (Include scope id in SocketAddrV6::Display)
 - rust-lang#77439 (Fix missing diagnostic span for `impl Trait` with const generics, and add various tests for `min_const_generics` and `const_generics`)
 - rust-lang#77471 (BTreeMap: refactoring around edges, missed spots)
 - rust-lang#77512 (Allow `Abort` terminators in all const-contexts)
 - rust-lang#77514 (Replace some once(x).chain(once(y)) with [x, y] IntoIter)

Failed merges:

r? `@ghost`
@bors bors merged commit e6e7ccc into rust-lang:master Oct 5, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 5, 2020
@GuillaumeGomez GuillaumeGomez deleted the doc-alias-crate-level branch October 5, 2020 08:04
lopopolo added a commit to artichoke/artichoke that referenced this pull request Oct 6, 2020
Fix for rust-lang/rust#76329 being merged into the latest nightly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doc-alias Area: `#[doc(alias)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#![doc(alias = "...")] is ignored as a crate level attribute
8 participants