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
336 B
Rust
Raw Normal View History

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