2018-12-09 08:46:12 -06:00
|
|
|
// edition:2018
|
2018-12-09 08:31:12 -06:00
|
|
|
// aux-build:dollar-crate.rs
|
2018-12-09 08:46:12 -06:00
|
|
|
// aux-build:dollar-crate-external.rs
|
2018-12-09 08:31:12 -06:00
|
|
|
|
2018-12-09 08:46:12 -06:00
|
|
|
// Anonymize unstable non-dummy spans while still showing dummy spans `0..0`.
|
|
|
|
// normalize-stdout-test "bytes\([^0]\w*\.\.(\w+)\)" -> "bytes(LO..$1)"
|
|
|
|
// normalize-stdout-test "bytes\((\w+)\.\.[^0]\w*\)" -> "bytes($1..HI)"
|
2018-12-09 08:31:12 -06:00
|
|
|
|
2018-12-17 18:21:28 -06:00
|
|
|
extern crate dollar_crate;
|
|
|
|
extern crate dollar_crate_external;
|
|
|
|
|
2018-12-09 08:31:12 -06:00
|
|
|
type S = u8;
|
|
|
|
|
2018-12-09 08:46:12 -06:00
|
|
|
mod local {
|
2018-12-17 18:21:28 -06:00
|
|
|
use crate::dollar_crate;
|
|
|
|
|
2018-12-09 08:46:12 -06:00
|
|
|
macro_rules! local {
|
|
|
|
() => {
|
|
|
|
dollar_crate::m! {
|
|
|
|
struct M($crate::S);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[dollar_crate::a]
|
|
|
|
struct A($crate::S);
|
|
|
|
|
|
|
|
#[derive(dollar_crate::d)]
|
|
|
|
struct D($crate::S); //~ ERROR the name `D` is defined multiple times
|
|
|
|
};
|
2018-12-09 08:31:12 -06:00
|
|
|
}
|
|
|
|
|
2018-12-09 08:46:12 -06:00
|
|
|
local!();
|
|
|
|
}
|
|
|
|
|
|
|
|
mod external {
|
2018-12-17 18:21:28 -06:00
|
|
|
use crate::dollar_crate_external;
|
|
|
|
|
2018-12-09 08:46:12 -06:00
|
|
|
dollar_crate_external::external!(); //~ ERROR the name `D` is defined multiple times
|
|
|
|
}
|
2018-12-09 08:31:12 -06:00
|
|
|
|
|
|
|
fn main() {}
|