about summary refs log tree commit diff
path: root/tests/rustdoc-ui/doctest/check-attr-test.rs
blob: d69dae63860eebca43f052cefac0631304bb01d3 (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
//@ compile-flags:--test

#![deny(rustdoc::invalid_codeblock_attributes)]

//~vvv ERROR unknown attribute `compile-fail`
//~| ERROR unknown attribute `compilefail`
//~| ERROR unknown attribute `comPile_fail`
/// foo
///
/// ```compile-fail,compilefail,comPile_fail
/// boo
/// ```
pub fn foo() {}

//~vvv ERROR unknown attribute `should-panic`
//~| ERROR unknown attribute `shouldpanic`
//~| ERROR unknown attribute `shOuld_panic`
/// bar
///
/// ```should-panic,shouldpanic,shOuld_panic
/// boo
/// ```
pub fn bar() {}

//~vvv ERROR unknown attribute `no-run`
//~| ERROR unknown attribute `norun`
//~| ERROR unknown attribute `nO_run`
/// foobar
///
/// ```no-run,norun,nO_run
/// boo
/// ```
pub fn foobar() {}

//~vvv ERROR unknown attribute `test-harness`
//~| ERROR unknown attribute `testharness`
//~| ERROR unknown attribute `tesT_harness`
/// b
///
/// ```test-harness,testharness,tesT_harness
/// boo
/// ```
pub fn b() {}