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 rust to let_underscore_lock example #103484

Merged
merged 6 commits into from
Nov 16, 2022
Merged

Conversation

saschanaz
Copy link
Contributor

Currently https://doc.rust-lang.org/beta/rustc/lints/listing/deny-by-default.html#let-underscore-lock has no colored grammar and raw {{produces}} command is exposed.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 24, 2022
@rust-highfive
Copy link
Collaborator

r? @eholk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2022
@saschanaz
Copy link
Contributor Author

(Will add other linters later)

@rust-log-analyzer

This comment has been minimized.

@saschanaz saschanaz changed the title Add compile_fail to let_underscore_drop example Add rust to let_underscore_lock example Oct 24, 2022
@ehuss
Copy link
Contributor

ehuss commented Oct 24, 2022

There is a bug in the tooling that should have prevented this from happening. Would you mind adding the following patch when fixing the other lints?

diff --git a/src/tools/lint-docs/src/lib.rs b/src/tools/lint-docs/src/lib.rs
index 857feb77325..3842a649c6f 100644
--- a/src/tools/lint-docs/src/lib.rs
+++ b/src/tools/lint-docs/src/lib.rs
@@ -37,10 +37,8 @@ fn doc_contains(&self, text: &str) -> bool {
     }

     fn is_ignored(&self) -> bool {
-        self.doc
-            .iter()
-            .filter(|line| line.starts_with("```rust"))
-            .all(|line| line.contains(",ignore"))
+        let blocks: Vec<_> = self.doc.iter().filter(|line| line.starts_with("```rust")).collect();
+        !blocks.is_empty() && blocks.iter().all(|line| line.contains(",ignore"))
     }

     /// Checks the doc style of the lint.

@rust-log-analyzer

This comment has been minimized.

/// }
///
/// fn test() -> impl Trait<Assoc = impl Sized> {
/// Struct
/// 42
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to copypaste from the tests since the example didn't emit the warning. @compiler-errors

@ehuss
Copy link
Contributor

ehuss commented Nov 15, 2022

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 15, 2022

📌 Commit 30b5223 has been approved by ehuss

It is now in the queue for this repository.

@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 Nov 15, 2022
@bors
Copy link
Contributor

bors commented Nov 15, 2022

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

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 15, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 15, 2022
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#103439 (Show note where the macro failed to match)
 - rust-lang#103734 (Adjust stabilization version to 1.65.0 for wasi fds)
 - rust-lang#104148 (Visit attributes of trait impl items during AST validation)
 - rust-lang#104241 (Move most of unwind's build script to lib.rs)
 - rust-lang#104258 (Deduce closure signature from a type alias `impl Trait`'s supertraits)
 - rust-lang#104296 (Walk types more carefully in `ProhibitOpaqueTypes` visitor)
 - rust-lang#104309 (Slightly improve error message for invalid identifier)
 - rust-lang#104316 (Simplify suggestions for errors in generators.)
 - rust-lang#104339 (Add `rustc_deny_explicit_impl`)

Failed merges:

 - rust-lang#103484 (Add `rust` to `let_underscore_lock` example)

r? `@ghost`
`@rustbot` modify labels: rollup
@saschanaz
Copy link
Contributor Author

Wait, why are the jobs canceled when there is no failure? 🤔

@ehuss
Copy link
Contributor

ehuss commented Nov 15, 2022

There is an internal error, it has been affecting other PRs today.

GitHub Actions has encountered an internal error when running your job.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 15, 2022

📌 Commit 0a528b1 has been approved by ehuss

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 15, 2022
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 15, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 16, 2022
Add `rust` to `let_underscore_lock` example

Currently https://doc.rust-lang.org/beta/rustc/lints/listing/deny-by-default.html#let-underscore-lock has no colored grammar and raw `{{produces}}` command is exposed.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Nov 16, 2022
Add `rust` to `let_underscore_lock` example

Currently https://doc.rust-lang.org/beta/rustc/lints/listing/deny-by-default.html#let-underscore-lock has no colored grammar and raw `{{produces}}` command is exposed.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 16, 2022
Add `rust` to `let_underscore_lock` example

Currently https://doc.rust-lang.org/beta/rustc/lints/listing/deny-by-default.html#let-underscore-lock has no colored grammar and raw `{{produces}}` command is exposed.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 16, 2022
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#103484 (Add `rust` to `let_underscore_lock` example)
 - rust-lang#103489 (Make `pointer::byte_offset_from` more generic)
 - rust-lang#104193 (Shift no characters when using raw string literals)
 - rust-lang#104348 (Respect visibility & stability of inherent associated types)
 - rust-lang#104401 (avoid memory leak in mpsc test)
 - rust-lang#104419 (Fix test/ui/issues/issue-30490.rs)
 - rust-lang#104424 (rustdoc: remove no-op CSS `.popover { font-size: 1rem }`)
 - rust-lang#104425 (rustdoc: remove no-op CSS `.main-header { justify-content }`)
 - rust-lang#104450 (Fuchsia test suite script fix)
 - rust-lang#104471 (Update PROBLEMATIC_CONSTS in style.rs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5140bbd into rust-lang:master Nov 16, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 16, 2022
@saschanaz saschanaz deleted the patch-2 branch November 16, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants