Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/base-db/Cargo.toml1
-rw-r--r--crates/cfg/Cargo.toml1
-rw-r--r--crates/hir-def/Cargo.toml1
-rw-r--r--crates/hir-def/src/dyn_map.rs4
-rw-r--r--crates/hir-def/src/item_tree.rs6
-rw-r--r--crates/hir-def/src/nameres/mod_resolution.rs2
-rw-r--r--crates/hir-def/src/resolver.rs5
-rw-r--r--crates/hir-expand/Cargo.toml1
-rw-r--r--crates/hir-expand/src/builtin/attr_macro.rs2
-rw-r--r--crates/hir-ty/Cargo.toml1
-rw-r--r--crates/hir-ty/src/display.rs2
-rw-r--r--crates/hir-ty/src/infer.rs9
-rw-r--r--crates/hir/Cargo.toml1
-rw-r--r--crates/hir/src/semantics/source_to_def.rs2
-rw-r--r--crates/hir/src/term_search/expr.rs2
-rw-r--r--crates/ide-assists/Cargo.toml1
-rw-r--r--crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs6
-rw-r--r--crates/ide-assists/src/handlers/extract_function.rs4
-rw-r--r--crates/ide-assists/src/handlers/generate_function.rs2
-rw-r--r--crates/ide-assists/src/handlers/inline_type_alias.rs2
-rw-r--r--crates/ide-completion/Cargo.toml1
-rw-r--r--crates/ide-completion/src/context.rs4
-rw-r--r--crates/ide-completion/src/context/analysis.rs5
-rw-r--r--crates/ide-completion/src/item.rs14
-rw-r--r--crates/ide-completion/src/lib.rs2
-rw-r--r--crates/ide-db/Cargo.toml1
-rw-r--r--crates/ide-db/src/path_transform.rs2
-rw-r--r--crates/ide-db/src/source_change.rs2
-rw-r--r--crates/ide-db/src/syntax_helpers/suggest_name.rs4
-rw-r--r--crates/ide-diagnostics/Cargo.toml1
-rw-r--r--crates/ide-diagnostics/src/lib.rs2
-rw-r--r--crates/ide-ssr/Cargo.toml1
-rw-r--r--crates/ide/Cargo.toml1
-rw-r--r--crates/intern/Cargo.toml1
-rw-r--r--crates/mbe/Cargo.toml1
-rw-r--r--crates/mbe/src/parser.rs4
-rw-r--r--crates/parser/Cargo.toml1
-rw-r--r--crates/parser/src/input.rs2
-rw-r--r--crates/parser/src/lib.rs2
-rw-r--r--crates/parser/src/output.rs5
-rw-r--r--crates/paths/Cargo.toml1
-rw-r--r--crates/paths/src/lib.rs2
-rw-r--r--crates/proc-macro-api/Cargo.toml1
-rw-r--r--crates/proc-macro-srv/Cargo.toml1
-rw-r--r--crates/proc-macro-srv/proc-macro-test/Cargo.toml1
-rw-r--r--crates/proc-macro-srv/proc-macro-test/imp/Cargo.toml1
-rw-r--r--crates/profile/Cargo.toml1
-rw-r--r--crates/project-model/Cargo.toml1
-rw-r--r--crates/rust-analyzer/Cargo.toml1
-rw-r--r--crates/rust-analyzer/src/op_queue.rs2
-rw-r--r--crates/rust-analyzer/src/tracing/config.rs4
-rw-r--r--crates/rust-analyzer/src/tracing/hprof.rs3
-rw-r--r--crates/rust-analyzer/src/tracing/json.rs3
-rw-r--r--crates/stdx/Cargo.toml1
-rw-r--r--crates/stdx/src/anymap.rs3
-rw-r--r--crates/stdx/src/macros.rs2
-rw-r--r--crates/syntax-bridge/Cargo.toml1
-rw-r--r--crates/syntax/Cargo.toml1
-rw-r--r--crates/syntax/src/algo.rs2
-rw-r--r--crates/syntax/src/ast/edit.rs4
-rw-r--r--crates/test-utils/Cargo.toml1
-rw-r--r--crates/test-utils/src/assert_linear.rs2
-rw-r--r--crates/test-utils/src/fixture.rs12
-rw-r--r--crates/toolchain/Cargo.toml1
-rw-r--r--crates/tt/Cargo.toml1
-rw-r--r--crates/vfs-notify/Cargo.toml1
-rw-r--r--crates/vfs/Cargo.toml1
-rw-r--r--crates/vfs/src/anchored_path.rs2
-rw-r--r--crates/vfs/src/vfs_path.rs2
69 files changed, 77 insertions, 93 deletions
diff --git a/crates/base-db/Cargo.toml b/crates/base-db/Cargo.toml
index 788ceb8857..042dd36488 100644
--- a/crates/base-db/Cargo.toml
+++ b/crates/base-db/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
lz4_flex = { version = "0.11", default-features = false }
diff --git a/crates/cfg/Cargo.toml b/crates/cfg/Cargo.toml
index 040bddbd7f..e887368ef2 100644
--- a/crates/cfg/Cargo.toml
+++ b/crates/cfg/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
rustc-hash.workspace = true
diff --git a/crates/hir-def/Cargo.toml b/crates/hir-def/Cargo.toml
index 9a448ec14e..a22961c26c 100644
--- a/crates/hir-def/Cargo.toml
+++ b/crates/hir-def/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
arrayvec.workspace = true
diff --git a/crates/hir-def/src/dyn_map.rs b/crates/hir-def/src/dyn_map.rs
index e9318d146d..8868bc0cd9 100644
--- a/crates/hir-def/src/dyn_map.rs
+++ b/crates/hir-def/src/dyn_map.rs
@@ -5,7 +5,9 @@
//!
//! It is used like this:
//!
-//! ```
+//! ```ignore
+//! # use hir_def::dyn_map::DynMap;
+//! # use hir_def::dyn_map::Key;
//! // keys define submaps of a `DynMap`
//! const STRING_TO_U32: Key<String, u32> = Key::new();
//! const U32_TO_VEC: Key<u32, Vec<bool>> = Key::new();
diff --git a/crates/hir-def/src/item_tree.rs b/crates/hir-def/src/item_tree.rs
index 8d5b3eeb28..382afbcb1d 100644
--- a/crates/hir-def/src/item_tree.rs
+++ b/crates/hir-def/src/item_tree.rs
@@ -883,20 +883,20 @@ pub struct UseTree {
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum UseTreeKind {
- /// ```
+ /// ```ignore
/// use path::to::Item;
/// use path::to::Item as Renamed;
/// use path::to::Trait as _;
/// ```
Single { path: Interned<ModPath>, alias: Option<ImportAlias> },
- /// ```
+ /// ```ignore
/// use *; // (invalid, but can occur in nested tree)
/// use path::*;
/// ```
Glob { path: Option<Interned<ModPath>> },
- /// ```
+ /// ```ignore
/// use prefix::{self, Item, ...};
/// ```
Prefixed { prefix: Option<Interned<ModPath>>, list: Box<[UseTree]> },
diff --git a/crates/hir-def/src/nameres/mod_resolution.rs b/crates/hir-def/src/nameres/mod_resolution.rs
index afee42ecec..17d09bcbd0 100644
--- a/crates/hir-def/src/nameres/mod_resolution.rs
+++ b/crates/hir-def/src/nameres/mod_resolution.rs
@@ -134,7 +134,7 @@ impl DirPath {
/// So this is the case which doesn't really work I think if we try to be
/// 100% platform agnostic:
///
- /// ```
+ /// ```ignore
/// mod a {
/// #[path="C://sad/face"]
/// mod b { mod c; }
diff --git a/crates/hir-def/src/resolver.rs b/crates/hir-def/src/resolver.rs
index 9dfb6e3cc4..e5774b4804 100644
--- a/crates/hir-def/src/resolver.rs
+++ b/crates/hir-def/src/resolver.rs
@@ -532,16 +532,17 @@ impl Resolver {
/// Note that in Rust one name can be bound to several items:
///
/// ```
+ /// # #![allow(non_camel_case_types)]
/// macro_rules! t { () => (()) }
/// type t = t!();
- /// const t: t = t!()
+ /// const t: t = t!();
/// ```
///
/// That's why we return a multimap.
///
/// The shadowing is accounted for: in
///
- /// ```
+ /// ```ignore
/// let it = 92;
/// {
/// let it = 92;
diff --git a/crates/hir-expand/Cargo.toml b/crates/hir-expand/Cargo.toml
index b193a34a01..7d561e0527 100644
--- a/crates/hir-expand/Cargo.toml
+++ b/crates/hir-expand/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/hir-expand/src/builtin/attr_macro.rs b/crates/hir-expand/src/builtin/attr_macro.rs
index f250620e77..e9dc17a28f 100644
--- a/crates/hir-expand/src/builtin/attr_macro.rs
+++ b/crates/hir-expand/src/builtin/attr_macro.rs
@@ -101,7 +101,7 @@ fn dummy_gate_test_expand(
/// somewhat inconsistently resolve derive attributes.
///
/// As such, we expand `#[derive(Foo, bar::Bar)]` into
-/// ```
+/// ```ignore
/// #![Foo]
/// #![bar::Bar]
/// ```
diff --git a/crates/hir-ty/Cargo.toml b/crates/hir-ty/Cargo.toml
index 4d36de0b38..27849f3b44 100644
--- a/crates/hir-ty/Cargo.toml
+++ b/crates/hir-ty/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/hir-ty/src/display.rs b/crates/hir-ty/src/display.rs
index ae8fbe2ce6..49f061813d 100644
--- a/crates/hir-ty/src/display.rs
+++ b/crates/hir-ty/src/display.rs
@@ -95,7 +95,7 @@ pub struct HirFormatter<'a> {
enum BoundsFormattingCtx {
Entered {
/// We can have recursive bounds like the following case:
- /// ```rust
+ /// ```ignore
/// where
/// T: Foo,
/// T::FooAssoc: Baz<<T::FooAssoc as Bar>::BarAssoc> + Bar
diff --git a/crates/hir-ty/src/infer.rs b/crates/hir-ty/src/infer.rs
index 0cb7002f44..556091c404 100644
--- a/crates/hir-ty/src/infer.rs
+++ b/crates/hir-ty/src/infer.rs
@@ -335,7 +335,7 @@ impl Default for InternedStandardTypes {
/// sized struct to a dynamically sized one. E.g., &[i32; 4] -> &[i32] is
/// represented by:
///
-/// ```
+/// ```ignore
/// Deref(None) -> [i32; 4],
/// Borrow(AutoBorrow::Ref) -> &[i32; 4],
/// Unsize -> &[i32],
@@ -481,9 +481,10 @@ pub struct InferenceResult {
/// or pattern can have multiple binding modes. For example:
/// ```
/// fn foo(mut slice: &[u32]) -> usize {
- /// slice = match slice {
- /// [0, rest @ ..] | rest => rest,
- /// };
+ /// slice = match slice {
+ /// [0, rest @ ..] | rest => rest,
+ /// };
+ /// 0
/// }
/// ```
/// the first `rest` has implicit `ref` binding mode, but the second `rest` binding mode is `move`.
diff --git a/crates/hir/Cargo.toml b/crates/hir/Cargo.toml
index c68ff706e4..2af3c2e4c3 100644
--- a/crates/hir/Cargo.toml
+++ b/crates/hir/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
rustc-hash.workspace = true
diff --git a/crates/hir/src/semantics/source_to_def.rs b/crates/hir/src/semantics/source_to_def.rs
index 4481b8855f..18cbaa15ae 100644
--- a/crates/hir/src/semantics/source_to_def.rs
+++ b/crates/hir/src/semantics/source_to_def.rs
@@ -5,7 +5,7 @@
//!
//! This module solves the following problem:
//!
-//! Given a piece of syntax, find the corresponding semantic definition (def).
+//! > Given a piece of syntax, find the corresponding semantic definition (def).
//!
//! This problem is a part of more-or-less every IDE feature implemented. Every
//! IDE functionality (like goto to definition), conceptually starts with a
diff --git a/crates/hir/src/term_search/expr.rs b/crates/hir/src/term_search/expr.rs
index 6ad074e8e5..d2070f0e18 100644
--- a/crates/hir/src/term_search/expr.rs
+++ b/crates/hir/src/term_search/expr.rs
@@ -40,7 +40,7 @@ fn mod_item_path_str(
/// Type tree shows how can we get from set of types to some type.
///
/// Consider the following code as an example
-/// ```
+/// ```ignore
/// fn foo(x: i32, y: bool) -> Option<i32> { None }
/// fn bar() {
/// let a = 1;
diff --git a/crates/ide-assists/Cargo.toml b/crates/ide-assists/Cargo.toml
index ba21586871..3768c2257c 100644
--- a/crates/ide-assists/Cargo.toml
+++ b/crates/ide-assists/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs b/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs
index c7b1314c86..5a9db67a5f 100644
--- a/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs
+++ b/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs
@@ -136,7 +136,7 @@ fn comment_to_doc(acc: &mut Assists, comment: ast::Comment, style: CommentPlacem
/// Not all comments are valid candidates for conversion into doc comments. For example, the
/// comments in the code:
-/// ```rust
+/// ```ignore
/// // Brilliant module right here
///
/// // Really good right
@@ -148,7 +148,7 @@ fn comment_to_doc(acc: &mut Assists, comment: ast::Comment, style: CommentPlacem
/// mod nice_module {}
/// ```
/// can be converted to doc comments. However, the comments in this example:
-/// ```rust
+/// ```ignore
/// fn foo_bar(foo: Foo /* not bar yet */) -> Bar {
/// foo.into_bar()
/// // Nicely done
@@ -162,7 +162,7 @@ fn comment_to_doc(acc: &mut Assists, comment: ast::Comment, style: CommentPlacem
/// are not allowed to become doc comments. Moreover, some comments _are_ allowed, but aren't common
/// style in Rust. For example, the following comments are allowed to be doc comments, but it is not
/// common style for them to be:
-/// ```rust
+/// ```ignore
/// fn foo_bar(foo: Foo) -> Bar {
/// // this could be an inner comment with //!
/// foo.into_bar()
diff --git a/crates/ide-assists/src/handlers/extract_function.rs b/crates/ide-assists/src/handlers/extract_function.rs
index 967da41c15..751e4a5a57 100644
--- a/crates/ide-assists/src/handlers/extract_function.rs
+++ b/crates/ide-assists/src/handlers/extract_function.rs
@@ -272,7 +272,7 @@ fn make_function_name(semantics_scope: &hir::SemanticsScope<'_>) -> ast::NameRef
/// * We want whole node, like `loop {}`, `2 + 2`, `{ let n = 1; }` exprs.
/// Then we can use `ast::Expr`
/// * We want a few statements for a block. E.g.
-/// ```rust,no_run
+/// ```ignore
/// fn foo() -> i32 {
/// let m = 1;
/// $0
@@ -386,7 +386,7 @@ struct ContainerInfo {
/// Control flow that is exported from extracted function
///
/// E.g.:
-/// ```rust,no_run
+/// ```ignore
/// loop {
/// $0
/// if 42 == 42 {
diff --git a/crates/ide-assists/src/handlers/generate_function.rs b/crates/ide-assists/src/handlers/generate_function.rs
index 8f5daa4125..91e248a1de 100644
--- a/crates/ide-assists/src/handlers/generate_function.rs
+++ b/crates/ide-assists/src/handlers/generate_function.rs
@@ -1037,7 +1037,7 @@ fn filter_bounds_in_scope(
/// Makes duplicate argument names unique by appending incrementing numbers.
///
-/// ```
+/// ```ignore
/// let mut names: Vec<String> =
/// vec!["foo".into(), "foo".into(), "bar".into(), "baz".into(), "bar".into()];
/// deduplicate_arg_names(&mut names);
diff --git a/crates/ide-assists/src/handlers/inline_type_alias.rs b/crates/ide-assists/src/handlers/inline_type_alias.rs
index 66dffde505..76d465b011 100644
--- a/crates/ide-assists/src/handlers/inline_type_alias.rs
+++ b/crates/ide-assists/src/handlers/inline_type_alias.rs
@@ -276,7 +276,7 @@ impl ConstAndTypeMap {
/// 1. Map the provided instance's generic args to the type alias's generic
/// params:
///
-/// ```
+/// ```ignore
/// type A<'a, const N: usize, T = u64> = &'a [T; N];
/// ^ alias generic params
/// let a: A<100>;
diff --git a/crates/ide-completion/Cargo.toml b/crates/ide-completion/Cargo.toml
index 1bef82af5a..68cc7a0b9a 100644
--- a/crates/ide-completion/Cargo.toml
+++ b/crates/ide-completion/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/ide-completion/src/context.rs b/crates/ide-completion/src/context.rs
index 7862b25878..919b30f7f9 100644
--- a/crates/ide-completion/src/context.rs
+++ b/crates/ide-completion/src/context.rs
@@ -249,8 +249,8 @@ pub(crate) enum Qualified {
/// This would be None, if path is not solely made of
/// `super` segments, e.g.
///
- /// ```rust
- /// use super::foo;
+ /// ```ignore
+ /// use super::foo;
/// ```
///
/// Otherwise it should be Some(count of `super`)
diff --git a/crates/ide-completion/src/context/analysis.rs b/crates/ide-completion/src/context/analysis.rs
index eecd412bc4..1a34548f70 100644
--- a/crates/ide-completion/src/context/analysis.rs
+++ b/crates/ide-completion/src/context/analysis.rs
@@ -97,7 +97,8 @@ fn token_at_offset_ignore_whitespace(file: &SyntaxNode, offset: TextSize) -> Opt
/// We do this by recursively expanding all macros and picking the best possible match. We cannot just
/// choose the first expansion each time because macros can expand to something that does not include
/// our completion marker, e.g.:
-/// ```
+///
+/// ```ignore
/// macro_rules! helper { ($v:ident) => {} }
/// macro_rules! my_macro {
/// ($v:ident) => {
@@ -106,7 +107,7 @@ fn token_at_offset_ignore_whitespace(file: &SyntaxNode, offset: TextSize) -> Opt
/// };
/// }
///
-/// my_macro!(complete_me_here)
+/// my_macro!(complete_me_here);
/// ```
/// If we would expand the first thing we encounter only (which in fact this method used to do), we would
/// be unable to complete here, because we would be walking directly into the void. So we instead try
diff --git a/crates/ide-completion/src/item.rs b/crates/ide-completion/src/item.rs
index 41a8240959..b3dd8a8d06 100644
--- a/crates/ide-completion/src/item.rs
+++ b/crates/ide-completion/src/item.rs
@@ -149,9 +149,9 @@ pub struct CompletionRelevance {
/// This is set when the identifier being completed matches up with the name that is expected,
/// like in a function argument.
///
- /// ```
+ /// ```ignore
/// fn f(spam: String) {}
- /// fn main {
+ /// fn main() {
/// let spam = 92;
/// f($0) // name of local matches the name of param
/// }
@@ -161,7 +161,7 @@ pub struct CompletionRelevance {
pub type_match: Option<CompletionRelevanceTypeMatch>,
/// Set for local variables.
///
- /// ```
+ /// ```ignore
/// fn foo(a: u32) {
/// let b = 0;
/// $0 // `a` and `b` are local
@@ -195,7 +195,7 @@ pub struct CompletionRelevanceTraitInfo {
pub enum CompletionRelevanceTypeMatch {
/// This is set in cases like these:
///
- /// ```
+ /// ```ignore
/// enum Option<T> { Some(T), None }
/// fn f(a: Option<u32>) {}
/// fn main {
@@ -205,9 +205,9 @@ pub enum CompletionRelevanceTypeMatch {
CouldUnify,
/// This is set in cases where the type matches the expected type, like:
///
- /// ```
+ /// ```ignore
/// fn f(spam: String) {}
- /// fn main {
+ /// fn main() {
/// let foo = String::new();
/// f($0) // type of local matches the type of param
/// }
@@ -221,7 +221,7 @@ pub enum CompletionRelevancePostfixMatch {
NonExact,
/// This is set in cases like these:
///
- /// ```
+ /// ```ignore
/// (a > b).not$0
/// ```
///
diff --git a/crates/ide-completion/src/lib.rs b/crates/ide-completion/src/lib.rs
index a1f2eaeb1b..a990b39481 100644
--- a/crates/ide-completion/src/lib.rs
+++ b/crates/ide-completion/src/lib.rs
@@ -143,7 +143,7 @@ impl CompletionFieldsToResolve {
/// already present, it should give all possible variants for the identifier at
/// the caret. In other words, for
///
-/// ```no_run
+/// ```ignore
/// fn f() {
/// let foo = 92;
/// let _ = bar$0
diff --git a/crates/ide-db/Cargo.toml b/crates/ide-db/Cargo.toml
index c8a8a2d169..641998c3da 100644
--- a/crates/ide-db/Cargo.toml
+++ b/crates/ide-db/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/ide-db/src/path_transform.rs b/crates/ide-db/src/path_transform.rs
index f045e44dd3..126b30470b 100644
--- a/crates/ide-db/src/path_transform.rs
+++ b/crates/ide-db/src/path_transform.rs
@@ -32,7 +32,7 @@ type DefaultedParam = Either<hir::TypeParam, hir::ConstParam>;
/// block), you generally want to appropriately qualify the names, and sometimes
/// you might want to substitute generic parameters as well:
///
-/// ```
+/// ```ignore
/// mod x {
/// pub struct A<V>;
/// pub trait T<U> { fn foo(&self, _: U) -> A<U>; }
diff --git a/crates/ide-db/src/source_change.rs b/crates/ide-db/src/source_change.rs
index 27ff91dc19..34642d7eaf 100644
--- a/crates/ide-db/src/source_change.rs
+++ b/crates/ide-db/src/source_change.rs
@@ -493,7 +493,7 @@ pub enum Snippet {
Placeholder(TextRange),
/// A group of placeholder snippets, e.g.
///
- /// ```no_run
+ /// ```ignore
/// let ${0:new_var} = 4;
/// fun(1, 2, 3, ${0:new_var});
/// ```
diff --git a/crates/ide-db/src/syntax_helpers/suggest_name.rs b/crates/ide-db/src/syntax_helpers/suggest_name.rs
index 0a7141c19b..e085bf15cb 100644
--- a/crates/ide-db/src/syntax_helpers/suggest_name.rs
+++ b/crates/ide-db/src/syntax_helpers/suggest_name.rs
@@ -79,7 +79,9 @@ const USELESS_METHODS: &[&str] = &[
/// the name, e.g. `a`, `a1`, `a2`, ...
///
/// # Examples
-/// ```rust
+///
+/// ```
+/// # use ide_db::syntax_helpers::suggest_name::NameGenerator;
/// let mut generator = NameGenerator::new();
/// assert_eq!(generator.suggest_name("a"), "a");
/// assert_eq!(generator.suggest_name("a"), "a1");
diff --git a/crates/ide-diagnostics/Cargo.toml b/crates/ide-diagnostics/Cargo.toml
index 281a08e542..483cb6df86 100644
--- a/crates/ide-diagnostics/Cargo.toml
+++ b/crates/ide-diagnostics/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/ide-diagnostics/src/lib.rs b/crates/ide-diagnostics/src/lib.rs
index 3ea41aa7e8..0a55b6e9be 100644
--- a/crates/ide-diagnostics/src/lib.rs
+++ b/crates/ide-diagnostics/src/lib.rs
@@ -697,7 +697,7 @@ struct SeverityAttr {
/// #[warn(non_snake_case)]
/// mod foo {
/// #[allow(nonstandard_style)]
- /// mod bar;
+ /// mod bar {}
/// }
/// ```
/// We want to not warn on non snake case inside `bar`. If we are traversing this for the first
diff --git a/crates/ide-ssr/Cargo.toml b/crates/ide-ssr/Cargo.toml
index 2561467628..fa75e5a421 100644
--- a/crates/ide-ssr/Cargo.toml
+++ b/crates/ide-ssr/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/ide/Cargo.toml b/crates/ide/Cargo.toml
index 7c66b36dc8..9af56c40e9 100644
--- a/crates/ide/Cargo.toml
+++ b/crates/ide/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/intern/Cargo.toml b/crates/intern/Cargo.toml
index c0358ef929..397eba0929 100644
--- a/crates/intern/Cargo.toml
+++ b/crates/intern/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
diff --git a/crates/mbe/Cargo.toml b/crates/mbe/Cargo.toml
index b37d57f280..e6fbb298eb 100644
--- a/crates/mbe/Cargo.toml
+++ b/crates/mbe/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/mbe/src/parser.rs b/crates/mbe/src/parser.rs
index 16d55492a0..0a670053c9 100644
--- a/crates/mbe/src/parser.rs
+++ b/crates/mbe/src/parser.rs
@@ -13,8 +13,8 @@ use crate::ParseError;
/// Consider
///
/// ```
-/// macro_rules! an_macro {
-/// ($x:expr + $y:expr) => ($y * $x)
+/// macro_rules! a_macro {
+/// ($x:expr, $y:expr) => ($y * $x)
/// }
/// ```
///
diff --git a/crates/parser/Cargo.toml b/crates/parser/Cargo.toml
index 48436ec71f..a36a39dbee 100644
--- a/crates/parser/Cargo.toml
+++ b/crates/parser/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
drop_bomb = "0.1.5"
diff --git a/crates/parser/src/input.rs b/crates/parser/src/input.rs
index c90b358cfb..cabdff214d 100644
--- a/crates/parser/src/input.rs
+++ b/crates/parser/src/input.rs
@@ -36,7 +36,7 @@ impl Input {
/// the *previous* token was joint, with mbe, you know whether the *current*
/// one is joint. This API allows for styles of usage:
///
- /// ```
+ /// ```ignore
/// // In text:
/// tokens.was_joint(prev_joint);
/// tokens.push(curr);
diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs
index e461492cc6..398ad7cf66 100644
--- a/crates/parser/src/lib.rs
+++ b/crates/parser/src/lib.rs
@@ -59,7 +59,7 @@ pub use crate::{
///
/// That is, for something like
///
-/// ```
+/// ```ignore
/// quick_check! {
/// fn prop() {}
/// }
diff --git a/crates/parser/src/output.rs b/crates/parser/src/output.rs
index 386d03a62c..0ea15a656c 100644
--- a/crates/parser/src/output.rs
+++ b/crates/parser/src/output.rs
@@ -16,8 +16,9 @@ pub struct Output {
/// 32-bit encoding of events. If LSB is zero, then that's an index into the
/// error vector. Otherwise, it's one of the thee other variants, with data encoded as
///
- /// |16 bit kind|8 bit n_input_tokens|4 bit tag|4 bit leftover|
- ///
+ /// ```text
+ /// |16 bit kind|8 bit n_input_tokens|4 bit tag|4 bit leftover|
+ /// ``````
event: Vec<u32>,
error: Vec<String>,
}
diff --git a/crates/paths/Cargo.toml b/crates/paths/Cargo.toml
index f0dafab70c..4cc70726da 100644
--- a/crates/paths/Cargo.toml
+++ b/crates/paths/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
camino.workspace = true
diff --git a/crates/paths/src/lib.rs b/crates/paths/src/lib.rs
index 0084244161..3d722b1ff1 100644
--- a/crates/paths/src/lib.rs
+++ b/crates/paths/src/lib.rs
@@ -232,7 +232,7 @@ impl AbsPath {
/// - Removes trailing slashes: `/a/b/` becomes `/a/b`.
///
/// # Example
- /// ```
+ /// ```ignore
/// # use paths::AbsPathBuf;
/// let abs_path_buf = AbsPathBuf::assert("/a/../../b/.//c//".into());
/// let normalized = abs_path_buf.normalize();
diff --git a/crates/proc-macro-api/Cargo.toml b/crates/proc-macro-api/Cargo.toml
index dac8e09435..f5ba40a994 100644
--- a/crates/proc-macro-api/Cargo.toml
+++ b/crates/proc-macro-api/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
serde.workspace = true
diff --git a/crates/proc-macro-srv/Cargo.toml b/crates/proc-macro-srv/Cargo.toml
index 191535ac55..d3b56b402e 100644
--- a/crates/proc-macro-srv/Cargo.toml
+++ b/crates/proc-macro-srv/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
object.workspace = true
diff --git a/crates/proc-macro-srv/proc-macro-test/Cargo.toml b/crates/proc-macro-srv/proc-macro-test/Cargo.toml
index 7c6a1ba46b..16fcc92962 100644
--- a/crates/proc-macro-srv/proc-macro-test/Cargo.toml
+++ b/crates/proc-macro-srv/proc-macro-test/Cargo.toml
@@ -7,7 +7,6 @@ edition = "2021"
license = "MIT OR Apache-2.0"
[lib]
-doctest = false
[build-dependencies]
cargo_metadata = "0.18.1"
diff --git a/crates/proc-macro-srv/proc-macro-test/imp/Cargo.toml b/crates/proc-macro-srv/proc-macro-test/imp/Cargo.toml
index fa189752b7..fb98d758a8 100644
--- a/crates/proc-macro-srv/proc-macro-test/imp/Cargo.toml
+++ b/crates/proc-macro-srv/proc-macro-test/imp/Cargo.toml
@@ -6,7 +6,6 @@ edition = "2021"
publish = false
[lib]
-doctest = false
proc-macro = true
[dependencies]
diff --git a/crates/profile/Cargo.toml b/crates/profile/Cargo.toml
index 65eec868af..9384fe2655 100644
--- a/crates/profile/Cargo.toml
+++ b/crates/profile/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cfg-if = "1.0.0"
diff --git a/crates/project-model/Cargo.toml b/crates/project-model/Cargo.toml
index ed647950e6..83def0e6b2 100644
--- a/crates/project-model/Cargo.toml
+++ b/crates/project-model/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 64c8afdc1f..6c81c238fd 100644
--- a/crates/rust-analyzer/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -13,7 +13,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[[bin]]
name = "rust-analyzer"
diff --git a/crates/rust-analyzer/src/op_queue.rs b/crates/rust-analyzer/src/op_queue.rs
index 123f20605a..709d99bda7 100644
--- a/crates/rust-analyzer/src/op_queue.rs
+++ b/crates/rust-analyzer/src/op_queue.rs
@@ -6,7 +6,7 @@ pub(crate) type Cause = String;
/// A single-item queue that allows callers to request an operation to
/// be performed later.
///
-/// ```
+/// ```ignore
/// let queue = OpQueue::default();
///
/// // Request work to be done.
diff --git a/crates/rust-analyzer/src/tracing/config.rs b/crates/rust-analyzer/src/tracing/config.rs
index 02ae4186ab..4f208b6c5d 100644
--- a/crates/rust-analyzer/src/tracing/config.rs
+++ b/crates/rust-analyzer/src/tracing/config.rs
@@ -31,7 +31,7 @@ pub struct Config<T> {
/// that specify level.
pub chalk_filter: Option<String>,
/// Filtering syntax, set in a shell:
- /// ```
+ /// ```text
/// env RA_PROFILE=* // dump everything
/// env RA_PROFILE=foo|bar|baz // enabled only selected entries
/// env RA_PROFILE=*@3>10 // dump everything, up to depth 3, if it takes more than 10
@@ -39,7 +39,7 @@ pub struct Config<T> {
pub profile_filter: Option<String>,
/// Filtering syntax, set in a shell:
- /// ```
+ /// ```text
/// env RA_PROFILE_JSON=foo|bar|baz
/// ```
pub json_profile_filter: Option<String>,
diff --git a/crates/rust-analyzer/src/tracing/hprof.rs b/crates/rust-analyzer/src/tracing/hprof.rs
index d466acef01..5b18762bb9 100644
--- a/crates/rust-analyzer/src/tracing/hprof.rs
+++ b/crates/rust-analyzer/src/tracing/hprof.rs
@@ -6,7 +6,8 @@
//!
//! Usage:
//!
-//! ```rust
+//! ```ignore
+//! # use tracing_subscriber::Registry;
//! let layer = hprof::SpanTree::default();
//! Registry::default().with(layer).init();
//! ```
diff --git a/crates/rust-analyzer/src/tracing/json.rs b/crates/rust-analyzer/src/tracing/json.rs
index 9e35990a5b..f5394d023a 100644
--- a/crates/rust-analyzer/src/tracing/json.rs
+++ b/crates/rust-analyzer/src/tracing/json.rs
@@ -2,7 +2,8 @@
//!
//! Usage:
//!
-//! ```rust
+//! ```ignore
+//! # use tracing_subscriber::Registry;
//! let layer = json::TimingLayer::new(std::io::stderr);
//! Registry::default().with(layer).init();
//! ```
diff --git a/crates/stdx/Cargo.toml b/crates/stdx/Cargo.toml
index 62c32d68e6..3727d0c956 100644
--- a/crates/stdx/Cargo.toml
+++ b/crates/stdx/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
backtrace = { version = "0.3.67", optional = true }
diff --git a/crates/stdx/src/anymap.rs b/crates/stdx/src/anymap.rs
index 91fab8e923..faf2e6c717 100644
--- a/crates/stdx/src/anymap.rs
+++ b/crates/stdx/src/anymap.rs
@@ -83,7 +83,8 @@ pub type RawMap<A> = hash_map::HashMap<TypeId, Box<A>, BuildHasherDefault<TypeId
/// (Here using the [`AnyMap`] convenience alias; the first line could use
/// <code>[anymap::Map][Map]::&lt;[core::any::Any]&gt;::new()</code> instead if desired.)
///
-/// ```rust
+/// ```
+/// # use stdx::anymap;
#[doc = "let mut data = anymap::AnyMap::new();"]
/// assert_eq!(data.get(), None::<&i32>);
/// ```
diff --git a/crates/stdx/src/macros.rs b/crates/stdx/src/macros.rs
index 85d9008fe1..880e2da70f 100644
--- a/crates/stdx/src/macros.rs
+++ b/crates/stdx/src/macros.rs
@@ -34,7 +34,7 @@ macro_rules! format_to_acc {
///
/// # Example
///
-/// ```rust
+/// ```ignore
/// impl_from!(Struct, Union, Enum for Adt);
/// ```
#[macro_export]
diff --git a/crates/syntax-bridge/Cargo.toml b/crates/syntax-bridge/Cargo.toml
index f9a9f40541..3e663422a0 100644
--- a/crates/syntax-bridge/Cargo.toml
+++ b/crates/syntax-bridge/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
rustc-hash.workspace = true
diff --git a/crates/syntax/Cargo.toml b/crates/syntax/Cargo.toml
index 51eaea5434..3fe6e01dc3 100644
--- a/crates/syntax/Cargo.toml
+++ b/crates/syntax/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
cov-mark = "2.0.0-pre.1"
diff --git a/crates/syntax/src/algo.rs b/crates/syntax/src/algo.rs
index 3b85b137aa..a8a8389394 100644
--- a/crates/syntax/src/algo.rs
+++ b/crates/syntax/src/algo.rs
@@ -25,7 +25,7 @@ pub fn ancestors_at_offset(
/// imprecise: if the cursor is strictly between two nodes of the desired type,
/// as in
///
-/// ```no_run
+/// ```ignore
/// struct Foo {}|struct Bar;
/// ```
///
diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs
index 579f3ba8b4..052d018e5c 100644
--- a/crates/syntax/src/ast/edit.rs
+++ b/crates/syntax/src/ast/edit.rs
@@ -72,9 +72,9 @@ impl IndentLevel {
}
/// XXX: this intentionally doesn't change the indent of the very first token.
- /// Ie, in something like
+ /// For example, in something like:
/// ```
- /// fn foo() {
+ /// fn foo() -> i32 {
/// 92
/// }
/// ```
diff --git a/crates/test-utils/Cargo.toml b/crates/test-utils/Cargo.toml
index b1457722a9..b99a2c4bd7 100644
--- a/crates/test-utils/Cargo.toml
+++ b/crates/test-utils/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
# Avoid adding deps here, this crate is widely used in tests it should compile fast!
diff --git a/crates/test-utils/src/assert_linear.rs b/crates/test-utils/src/assert_linear.rs
index 15c30c52a5..f78bf59a2f 100644
--- a/crates/test-utils/src/assert_linear.rs
+++ b/crates/test-utils/src/assert_linear.rs
@@ -11,7 +11,7 @@
//! Ideally, we should use a proper "model selection" to directly compare
//! quadratic and linear models, but that sounds rather complicated:
//!
-//! https://stats.stackexchange.com/questions/21844/selecting-best-model-based-on-linear-quadratic-and-cubic-fit-of-data
+//! > https://stats.stackexchange.com/questions/21844/selecting-best-model-based-on-linear-quadratic-and-cubic-fit-of-data
//!
//! We might get false positives on a VM, but never false negatives. So, if the
//! first round fails, we repeat the ordeal three more times and fail only if
diff --git a/crates/test-utils/src/fixture.rs b/crates/test-utils/src/fixture.rs
index 7fe26d53bf..daeb56c583 100644
--- a/crates/test-utils/src/fixture.rs
+++ b/crates/test-utils/src/fixture.rs
@@ -6,7 +6,8 @@
//! Use this to test functionality local to one file.
//!
//! Simple Example:
-//! ```
+//!
+//! ```ignore
//! r#"
//! fn main() {
//! println!("Hello World")
@@ -19,7 +20,8 @@
//! which is also how to define multiple files in a single test fixture
//!
//! Example using two files in the same crate:
-//! ```
+//!
+//! ```ignore
//! "
//! //- /main.rs
//! mod foo;
@@ -33,7 +35,8 @@
//! ```
//!
//! Example using two crates with one file each, with one crate depending on the other:
-//! ```
+//!
+//! ```ignore
//! r#"
//! //- /main.rs crate:a deps:b
//! fn main() {
@@ -51,7 +54,8 @@
//! for the syntax.
//!
//! Example using some available metadata:
-//! ```
+//!
+//! ```ignore
//! "
//! //- /lib.rs crate:foo deps:bar,baz cfg:foo=a,bar=b env:OUTDIR=path/to,OTHER=foo
//! fn insert_source_code_here() {}
diff --git a/crates/toolchain/Cargo.toml b/crates/toolchain/Cargo.toml
index 87e8efb20f..38daacdf95 100644
--- a/crates/toolchain/Cargo.toml
+++ b/crates/toolchain/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
home = "0.5.4"
diff --git a/crates/tt/Cargo.toml b/crates/tt/Cargo.toml
index 82e7c24668..529fad3244 100644
--- a/crates/tt/Cargo.toml
+++ b/crates/tt/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
arrayvec.workspace = true
diff --git a/crates/vfs-notify/Cargo.toml b/crates/vfs-notify/Cargo.toml
index bc54d7168f..48b4d22de2 100644
--- a/crates/vfs-notify/Cargo.toml
+++ b/crates/vfs-notify/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
tracing.workspace = true
diff --git a/crates/vfs/Cargo.toml b/crates/vfs/Cargo.toml
index e8a6195036..546195481c 100644
--- a/crates/vfs/Cargo.toml
+++ b/crates/vfs/Cargo.toml
@@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true
[lib]
-doctest = false
[dependencies]
rustc-hash.workspace = true
diff --git a/crates/vfs/src/anchored_path.rs b/crates/vfs/src/anchored_path.rs
index db15a2a21c..1b9fb355b4 100644
--- a/crates/vfs/src/anchored_path.rs
+++ b/crates/vfs/src/anchored_path.rs
@@ -2,7 +2,7 @@
//!
//! The primary goal of this is to losslessly represent paths like
//!
-//! ```
+//! ```ignore
//! #[path = "./bar.rs"]
//! mod foo;
//! ```
diff --git a/crates/vfs/src/vfs_path.rs b/crates/vfs/src/vfs_path.rs
index 3c8e37413f..cce8595cc4 100644
--- a/crates/vfs/src/vfs_path.rs
+++ b/crates/vfs/src/vfs_path.rs
@@ -59,7 +59,7 @@ impl VfsPath {
///
/// # Example
///
- /// ```
+ /// ```ignore
/// # use vfs::{AbsPathBuf, VfsPath};
/// let mut path = VfsPath::from(AbsPathBuf::assert("/foo/bar".into()));
/// assert!(path.pop());