rust/tests/ui/lint/test-inner-fn.rs

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

20 lines
337 B
Rust
Raw Normal View History

2018-07-21 09:04:02 +08:00
//@ compile-flags: --test -D unnameable_test_items
2018-06-09 09:24:57 +08:00
#[test]
fn foo() {
2018-07-21 09:04:02 +08:00
#[test] //~ ERROR cannot test inner items [unnameable_test_items]
2018-06-09 09:24:57 +08:00
fn bar() {}
bar();
}
mod x {
#[test]
fn foo() {
2018-07-21 09:04:02 +08:00
#[test] //~ ERROR cannot test inner items [unnameable_test_items]
2018-06-09 09:24:57 +08:00
fn bar() {}
bar();
}
}
fn main() {}