aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-18 23:19:53 +0000
committerGitHub <[email protected]>2021-01-18 23:19:53 +0000
commit5231f4b27098d3eee621d2b781a92c6f3e9f267b (patch)
treedc40df33717ca3115017a9ecae2347020c253fcd /crates/parser/src
parentbf889bcf3be44720ca1c26fccec0374dfc7f3763 (diff)
parente7d1f30cb3c8486a8f00407b314688b7461de9fa (diff)
Merge #7341
7341: Fix warnings when running `cargo doc --document-private-items` r=Veykril a=jyn514 These were the warnings previously: <details> ``` warning: could not parse code block as Rust code --> crates/stdx/src/lib.rs:137:9 | 137 | /// ∀ x in slice[..idx]: pred(x) | _________^ 138 | | /// && ∀ x in slice[idx..]: !pred(x) | |____^ | = note: error from rustc: unknown start of token: \u{2200} warning: 1 warning emitted warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = note: `#[warn(broken_intra_doc_links)]` on by default = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: 2 warnings emitted warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = note: `#[warn(broken_intra_doc_links)]` on by default = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: unresolved link to `package` --> crates/base_db/src/input.rs:181:15 | 181 | /// it's [package].name, can be different for other project types or even | ^^^^^^^ no item named `package` in scope | = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` warning: 2 warnings emitted ``` </details> This does *not* fix the following warning, because it is actually rust code and rustdoc is being over eager: ``` warning: Rust code block is empty --> crates/parser/src/grammar.rs:16:5 | 16 | //! ``` | _____^ 17 | | //! // test function_with_zero_parameters 18 | | //! // fn foo() {} 19 | | //! ``` | |_______^ | help: mark blocks that do not contain Rust code as text | 16 | //! ```text | ^^^^^^^ ``` https://github.com/rust-lang/rust/pull/79816 should make this configurable so the warning can be `allow`ed. Co-authored-by: Joshua Nelson <[email protected]>
Diffstat (limited to 'crates/parser/src')
-rw-r--r--crates/parser/src/event.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/parser/src/event.rs b/crates/parser/src/event.rs
index a7d06a815..903668892 100644
--- a/crates/parser/src/event.rs
+++ b/crates/parser/src/event.rs
@@ -38,14 +38,16 @@ pub(crate) enum Event {
38 /// 38 ///
39 /// The events for it would look like this: 39 /// The events for it would look like this:
40 /// 40 ///
41 /// 41 /// ```text
42 /// START(PATH) IDENT('foo') FINISH START(PATH) T![::] IDENT('bar') FINISH 42 /// START(PATH) IDENT('foo') FINISH START(PATH) T![::] IDENT('bar') FINISH
43 /// | /\ 43 /// | /\
44 /// | | 44 /// | |
45 /// +------forward-parent------+ 45 /// +------forward-parent------+
46 /// ```
46 /// 47 ///
47 /// And the tree would look like this 48 /// And the tree would look like this
48 /// 49 ///
50 /// ```text
49 /// +--PATH---------+ 51 /// +--PATH---------+
50 /// | | | 52 /// | | |
51 /// | | | 53 /// | | |
@@ -54,6 +56,7 @@ pub(crate) enum Event {
54 /// PATH 56 /// PATH
55 /// | 57 /// |
56 /// 'foo' 58 /// 'foo'
59 /// ```
57 /// 60 ///
58 /// See also `CompletedMarker::precede`. 61 /// See also `CompletedMarker::precede`.
59 Start { 62 Start {