]> git.lizzy.rs Git - rust.git/blob - src/test/ui/syntax-extension-minor.rs
Auto merge of #55780 - ogoffart:span_source_text, r=petrochenkov
[rust.git] / src / test / ui / syntax-extension-minor.rs
1 #![feature(concat_idents)]
2
3 pub fn main() {
4     struct Foo;
5     let _: concat_idents!(F, oo) = Foo; // Test that `concat_idents!` can be used in type positions
6
7     let asdf_fdsa = "<.<".to_string();
8     // this now fails (correctly, I claim) because hygiene prevents
9     // the assembled identifier from being a reference to the binding.
10     assert!(concat_idents!(asd, f_f, dsa) == "<.<".to_string());
11     //~^ ERROR cannot find value `asdf_fdsa` in this scope
12
13     assert_eq!(stringify!(use_mention_distinction), "use_mention_distinction");
14 }