Files
rust/tests/rustdoc-ui/doctest/check-attr-test.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
932 B
Rust
Raw Permalink Normal View History

2020-04-22 00:58:52 +02:00
//@ compile-flags:--test
#![deny(rustdoc::invalid_codeblock_attributes)]
2020-04-22 00:58:52 +02:00
//~vvv ERROR unknown attribute `compile-fail`
//~| ERROR unknown attribute `compilefail`
//~| ERROR unknown attribute `comPile_fail`
2020-04-22 00:58:52 +02:00
/// 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`
2020-04-22 00:58:52 +02:00
/// 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`
2020-04-22 00:58:52 +02:00
/// 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`
2020-04-22 00:58:52 +02:00
/// b
///
/// ```test-harness,testharness,tesT_harness
/// boo
/// ```
pub fn b() {}