]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/doc/unbalanced_ticks.rs
1 //! This file tests for the `DOC_MARKDOWN` lint, specifically cases
2 //! where ticks are unbalanced (see issue #6753).
5 #![warn(clippy::doc_markdown)]
7 /// This is a doc comment with `unbalanced_tick marks and several words that
8 /// should be `encompassed_by` tick marks because they `contain_underscores`.
9 /// Because of the initial `unbalanced_tick` pair, the error message is
10 /// very `confusing_and_misleading`.
13 /// This paragraph has `unbalanced_tick marks and should stop_linting.
15 /// This paragraph is fine and should_be linted normally.
17 /// Double unbalanced backtick from ``here to here` should lint.
19 /// Double balanced back ticks ``start end`` is fine.
20 fn multiple_paragraphs() {}
23 /// // Unbalanced tick mark in code block shouldn't warn:
34 /// - This `item has unbalanced tick marks
35 /// - This item needs backticks_here
36 fn other_markdown() {}
41 /// pub struct Struct;