2019-10-04 01:53:20 +03:00
|
|
|
// edition:2018
|
2019-05-22 01:09:58 +03:00
|
|
|
// aux-build:test-macros.rs
|
2018-09-13 05:11:13 +03:00
|
|
|
|
2019-05-22 01:09:58 +03:00
|
|
|
#[macro_use]
|
|
|
|
extern crate test_macros;
|
2018-09-13 05:11:13 +03:00
|
|
|
|
2019-05-22 01:09:58 +03:00
|
|
|
use test_macros::empty_attr as empty_helper;
|
|
|
|
|
|
|
|
#[empty_helper] //~ ERROR `empty_helper` is ambiguous
|
|
|
|
#[derive(Empty)]
|
2018-12-30 20:07:43 +03:00
|
|
|
struct S {
|
2019-10-05 16:30:08 +03:00
|
|
|
#[empty_helper] //~ ERROR `empty_helper` is ambiguous
|
2018-12-30 20:07:43 +03:00
|
|
|
field: [u8; {
|
2019-10-04 01:53:20 +03:00
|
|
|
use empty_helper; //~ ERROR `empty_helper` is ambiguous
|
2018-09-13 05:11:13 +03:00
|
|
|
|
2019-10-05 16:30:08 +03:00
|
|
|
#[empty_helper] //~ ERROR `empty_helper` is ambiguous
|
2018-12-30 20:07:43 +03:00
|
|
|
struct U;
|
|
|
|
|
|
|
|
mod inner {
|
2019-10-05 16:30:08 +03:00
|
|
|
// OK, no ambiguity, the non-helper attribute is not in scope here, only the helper.
|
2019-08-24 21:12:13 +03:00
|
|
|
#[empty_helper]
|
2018-12-30 20:07:43 +03:00
|
|
|
struct V;
|
|
|
|
}
|
|
|
|
|
|
|
|
0
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let s = S { field: [] };
|
|
|
|
}
|