summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/lints/check-attr.rs
blob: 3c06e6c076bf6f6adcc2dc6a380deb83d7939c55 (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
#![deny(rustdoc::invalid_codeblock_attributes)]

/// foo
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
///
/// ```compile-fail,compilefail,comPile_fail
/// boo
/// ```
pub fn foo() {}

/// bar
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
///
/// ```should-panic,shouldpanic,sHould_panic
/// boo
/// ```
pub fn bar() {}

/// foobar
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
///
/// ```no-run,norun,no_Run
/// boo
/// ```
pub fn foobar() {}

/// b
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
///
/// ```test-harness,testharness,teSt_harness
/// boo
/// ```
pub fn b() {}

/// b
//~^ ERROR
///
/// ```rust2018
/// boo
/// ```
pub fn c() {}

/// b
//~^ ERROR
//~| ERROR
///
/// ```rust2018 shouldpanic
/// boo
/// ```
pub fn d() {}