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