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 {
|
|
|
|
// FIXME No ambiguity, attributes in non-macro positions are not resolved properly
|
2019-05-22 01:09:58 +03:00
|
|
|
#[empty_helper]
|
2018-12-30 20:07:43 +03:00
|
|
|
field: [u8; {
|
|
|
|
// FIXME No ambiguity, derive helpers are not put into scope for non-attributes
|
2019-05-22 01:09:58 +03:00
|
|
|
use empty_helper;
|
2018-09-13 05:11:13 +03:00
|
|
|
|
2018-12-30 20:07:43 +03:00
|
|
|
// FIXME No ambiguity, derive helpers are not put into scope for inner items
|
2019-05-22 01:09:58 +03:00
|
|
|
#[empty_helper]
|
2018-12-30 20:07:43 +03:00
|
|
|
struct U;
|
|
|
|
|
|
|
|
mod inner {
|
2019-08-24 21:12:13 +03:00
|
|
|
// FIXME No ambiguity, attributes in non-macro positions are not resolved properly
|
|
|
|
#[empty_helper]
|
2018-12-30 20:07:43 +03:00
|
|
|
struct V;
|
|
|
|
}
|
|
|
|
|
|
|
|
0
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let s = S { field: [] };
|
|
|
|
}
|