rust/tests/ui/syntax-extension-minor.rs

15 lines
413 B
Rust
Raw Normal View History

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