Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/tests/sourcegen.rs')
-rw-r--r--crates/ide-diagnostics/src/tests/sourcegen.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/crates/ide-diagnostics/src/tests/sourcegen.rs b/crates/ide-diagnostics/src/tests/sourcegen.rs
index 24bf6c3589..ec6558a46e 100644
--- a/crates/ide-diagnostics/src/tests/sourcegen.rs
+++ b/crates/ide-diagnostics/src/tests/sourcegen.rs
@@ -1,12 +1,9 @@
//! Generates `assists.md` documentation.
-#[cfg(not(feature = "in-rust-tree"))]
use std::{fmt, fs, io, path::PathBuf};
-#[cfg(not(feature = "in-rust-tree"))]
use sourcegen::project_root;
-#[cfg(not(feature = "in-rust-tree"))]
#[test]
fn sourcegen_diagnostic_docs() {
let diagnostics = Diagnostic::collect().unwrap();
@@ -17,7 +14,6 @@ fn sourcegen_diagnostic_docs() {
fs::write(&dst, &contents).unwrap();
}
-#[cfg(not(feature = "in-rust-tree"))]
#[derive(Debug)]
struct Diagnostic {
id: String,
@@ -25,7 +21,6 @@ struct Diagnostic {
doc: String,
}
-#[cfg(not(feature = "in-rust-tree"))]
impl Diagnostic {
fn collect() -> io::Result<Vec<Diagnostic>> {
let handlers_dir = project_root().join("crates/ide-diagnostics/src/handlers");
@@ -56,7 +51,6 @@ impl Diagnostic {
}
}
-#[cfg(not(feature = "in-rust-tree"))]
fn is_valid_diagnostic_name(diagnostic: &str) -> Result<(), String> {
let diagnostic = diagnostic.trim();
if diagnostic.find(char::is_whitespace).is_some() {
@@ -72,7 +66,6 @@ fn is_valid_diagnostic_name(diagnostic: &str) -> Result<(), String> {
Ok(())
}
-#[cfg(not(feature = "in-rust-tree"))]
impl fmt::Display for Diagnostic {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
writeln!(f, "=== {}\n**Source:** {}\n{}", self.id, self.location, self.doc)