Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #13862 - danieleades:logic-bug, r=lnicola
comment out disabled code
bors 2023-01-11
parent 6e89e77 · parent db41e6b · commit 674b52a
-rw-r--r--crates/rust-analyzer/tests/slow-tests/tidy.rs27
-rw-r--r--crates/syntax/src/syntax_node.rs1
2 files changed, 1 insertions, 27 deletions
diff --git a/crates/rust-analyzer/tests/slow-tests/tidy.rs b/crates/rust-analyzer/tests/slow-tests/tidy.rs
index 35b5af7319..8e3097fce4 100644
--- a/crates/rust-analyzer/tests/slow-tests/tidy.rs
+++ b/crates/rust-analyzer/tests/slow-tests/tidy.rs
@@ -82,7 +82,6 @@ fn files_are_tidy() {
check_dbg(&path, &text);
check_test_attrs(&path, &text);
check_trailing_ws(&path, &text);
- deny_clippy(&path, &text);
tidy_docs.visit(&path, &text);
tidy_marks.visit(&path, &text);
}
@@ -144,32 +143,6 @@ fn check_cargo_toml(path: &Path, text: String) {
}
}
-fn deny_clippy(path: &Path, text: &str) {
- let ignore = &[
- // The documentation in string literals may contain anything for its own purposes
- "ide-db/src/generated/lints.rs",
- // The tests test clippy lint hovers
- "ide/src/hover/tests.rs",
- // The tests test clippy lint completions
- "ide-completion/src/tests/attribute.rs",
- ];
- if ignore.iter().any(|p| path.ends_with(p)) {
- return;
- }
-
- if text.contains("\u{61}llow(clippy") {
- panic!(
- "\n\nallowing lints is forbidden: {}.
-rust-analyzer intentionally doesn't check clippy on CI.
-You can allow lint globally via `xtask clippy`.
-See https://github.com/rust-lang/rust-clippy/issues/5537 for discussion.
-
-",
- path.display()
- )
- }
-}
-
#[cfg(not(feature = "in-rust-tree"))]
#[test]
fn check_licenses() {
diff --git a/crates/syntax/src/syntax_node.rs b/crates/syntax/src/syntax_node.rs
index a08c01597d..2e9e0bc226 100644
--- a/crates/syntax/src/syntax_node.rs
+++ b/crates/syntax/src/syntax_node.rs
@@ -48,6 +48,7 @@ impl SyntaxTreeBuilder {
pub fn finish(self) -> Parse<SyntaxNode> {
let (green, errors) = self.finish_raw();
// Disable block validation, see https://github.com/rust-lang/rust-analyzer/pull/10357
+ #[allow(clippy::overly_complex_bool_expr)]
if cfg!(debug_assertions) && false {
let node = SyntaxNode::new_root(green.clone());
crate::validation::validate_block_structure(&node);