2019-09-14 21:17:11 +01:00
|
|
|
//@ run-pass
|
|
|
|
|
2016-08-24 13:07:43 +02:00
|
|
|
#![feature(concat_idents)]
|
2011-08-03 11:46:32 -07:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2016-05-19 05:22:42 +00:00
|
|
|
struct Foo;
|
|
|
|
let _: concat_idents!(F, oo) = Foo; // Test that `concat_idents!` can be used in type positions
|
|
|
|
|
2014-05-25 03:10:11 -07:00
|
|
|
let asdf_fdsa = "<.<".to_string();
|
2019-09-14 21:17:11 +01:00
|
|
|
// concat_idents should have call-site hygiene.
|
2015-12-11 20:59:11 +13:00
|
|
|
assert!(concat_idents!(asd, f_f, dsa) == "<.<".to_string());
|
2011-08-03 11:46:32 -07:00
|
|
|
|
2015-06-07 21:00:38 +03:00
|
|
|
assert_eq!(stringify!(use_mention_distinction), "use_mention_distinction");
|
2011-08-13 00:10:18 -07:00
|
|
|
}
|