summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-3158.rs
blob: 4bbbdc1d039224eed7ad7dbeb510ba53f2689fda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// rustfmt-format_code_in_doc_comments: true

/// Should format
/// ```rust
/// assert!(false);
/// ```
///
/// Should format
/// ```rust,should_panic
/// assert!(false);
/// ```
///
/// Should format
/// ```rust,should_panic,edition2018
/// assert!(false);
/// ```
///
/// Should format
/// ```rust , should_panic , edition2018
/// assert!(false);
/// ```
///
/// Should not format
/// ```ignore
/// assert!( false );
/// ```
///
/// Should not format (not all are rust)
/// ```rust,ignore
/// assert!( false );
/// ```
///
/// Should not format (rust compile_fail)
/// ```compile_fail
/// assert!( false );
/// ```
///
/// Should not format (rust compile_fail)
/// ```rust,compile_fail
/// assert!( false );
/// ```
///
/// Various unspecified ones that should format
/// ```
/// assert!(false);
/// ```
///
/// ```,
/// assert!(false);
/// ```
///
/// ```,,,,,
/// assert!(false);
/// ```
///
/// ```,,,  rust  ,,
/// assert!(false);
/// ```
///
/// Should not format
/// ```,,,  rust  ,  ignore,
/// assert!( false );
/// ```
///
/// Few empty ones
/// ```
/// ```
///
/// ```rust
/// ```
///
/// ```ignore
/// ```
fn foo() {}