-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
r? @eholk (rust-highfive has picked a reviewer for you, use r? to override) |
(Will add other linters later) |
This comment has been minimized.
This comment has been minimized.
compile_fail
to let_underscore_drop
examplerust
to let_underscore_lock
example
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. |
This comment has been minimized.
This comment has been minimized.
/// } | ||
/// | ||
/// fn test() -> impl Trait<Assoc = impl Sized> { | ||
/// Struct | ||
/// 42 |
There was a problem hiding this comment.
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
Thanks! @bors r+ rollup |
☔ The latest upstream changes (presumably #104428) made this pull request unmergeable. Please resolve the merge conflicts. |
…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
Wait, why are the jobs canceled when there is no failure? 🤔 |
There is an internal error, it has been affecting other PRs today.
@bors r+ rollup |
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.
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.
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.
…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
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.