]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/source/issue-3055/original.rs
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'
[rust.git] / src / tools / rustfmt / tests / source / issue-3055 / original.rs
1 // rustfmt-wrap_comments: true
2 // rustfmt-format_code_in_doc_comments: true
3
4 /// Vestibulum elit nibh, rhoncus non, euismod sit amet, pretium eu, enim. Nunc commodo ultricies dui.
5 ///
6 /// Should not format with text attribute
7 /// ```text
8 ///           .--------------.
9 ///           |              v
10 /// Park <- Idle -> Poll -> Probe -> Download -> Install -> Reboot
11 ///           ^      ^        '          '          '
12 ///           '      '        '          '          '
13 ///           '      `--------'          '          '
14 ///           `---------------'          '          '
15 ///           `--------------------------'          '
16 ///           `-------------------------------------'
17 /// ```
18 ///
19 /// Should not format with ignore attribute
20 /// ```text
21 ///           .--------------.
22 ///           |              v
23 /// Park <- Idle -> Poll -> Probe -> Download -> Install -> Reboot
24 ///           ^      ^        '          '          '
25 ///           '      '        '          '          '
26 ///           '      `--------'          '          '
27 ///           `---------------'          '          '
28 ///           `--------------------------'          '
29 ///           `-------------------------------------'
30 /// ```
31 ///
32 /// Should format with rust attribute
33 /// ```rust
34 /// let x =
35 ///    42;
36 /// ```
37 ///
38 /// Should format with no attribute as it defaults to rust
39 /// ```
40 /// let x =
41 ///    42;
42 /// ```
43 fn func() {}