diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs index 2dd8fbe679..b5f7e4200a 100644 --- a/crates/base_db/src/input.rs +++ b/crates/base_db/src/input.rs @@ -178,7 +178,7 @@ pub struct CrateData { pub root_file_id: FileId, pub edition: Edition, /// A name used in the package's project declaration: for Cargo projects, - /// it's [package].name, can be different for other project types or even + /// its `[package].name` can be different for other project types or even /// absent (a dummy crate for the code snippet, for example). /// /// For purposes of analysis, crates are anonymous (only names in diff --git a/crates/parser/src/event.rs b/crates/parser/src/event.rs index a7d06a815c..9036688921 100644 --- a/crates/parser/src/event.rs +++ b/crates/parser/src/event.rs @@ -38,14 +38,16 @@ pub(crate) enum Event { /// /// The events for it would look like this: /// - /// + /// ```text /// START(PATH) IDENT('foo') FINISH START(PATH) T![::] IDENT('bar') FINISH /// | /\ /// | | /// +------forward-parent------+ + /// ``` /// /// And the tree would look like this /// + /// ```text /// +--PATH---------+ /// | | | /// | | | @@ -54,6 +56,7 @@ pub(crate) enum Event { /// PATH /// | /// 'foo' + /// ``` /// /// See also `CompletedMarker::precede`. Start { diff --git a/crates/stdx/src/lib.rs b/crates/stdx/src/lib.rs index 1ff2559bbd..73b121f8a8 100644 --- a/crates/stdx/src/lib.rs +++ b/crates/stdx/src/lib.rs @@ -134,8 +134,10 @@ impl<'a> Iterator for LinesWithEnds<'a> { /// Returns `idx` such that: /// +/// ```text /// ∀ x in slice[..idx]: pred(x) /// && ∀ x in slice[idx..]: !pred(x) +/// ``` /// /// https://github.com/rust-lang/rust/issues/73831 pub fn partition_point(slice: &[T], mut pred: P) -> usize